How can i generate solution using Newton Raphson Method for two equations and two unknowns?
Afficher commentaires plus anciens
hello,
i have a specific two equiations,How can i solve it using Newton Raphson? I'm waiting your solutions.. Thanks..
My Unknows - Ht and Hs
and Equations
F1 = -24818293809749471470110210071781/618970019642690137449562112/Hs^2+56127954443102947/5070602400912917605986812821504*Hs^(31/10)+69817699429225617/5070602400912917605986812821504*Hs^(41/10)/Ht+488723896004579319/50706024009129176059868128215040000*Hs^(41/10)-3058826600166217/38685626227668133590597632*Ht^(7/2)/Hs^2
F2 = -24818293809749471470110210071781/618970019642690137449562112/Ht^2-6844872493061335/2535301200456458802993406410752*Hs^(51/10)/Ht^2+21411786201163519/77371252455336267181195264*Ht^(5/2)/Hs+15294133000831085/77371252455336267181195264*Ht^(3/2)+149882503408144633/773712524553362671811952640000*Ht^(5/2)
F1=F2=0
Réponse acceptée
Plus de réponses (1)
Akash Nambiar
le 1 Avr 2022
0 votes
% Program Code of Newton-Raphson Method in MATLAB
a=input('Enter the function in the form of variable x:','s');
x(1)=input('Enter Initial Guess:');
error=input('Enter allowed Error:');
f=inline(a)
dif=diff(sym(a));
d=inline(dif);
for i=1:100
x(i+1)=x(i)-((f(x(i))/d(x(i))));
err(i)=abs((x(i+1)-x(i))/x(i));
if err(i)<error
break
end
end
root=x(i)
Catégories
En savoir plus sur Newton-Raphson Method dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!