Newton Raphson on MATLAB
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello Community. Here im trying to find the rho_a using the Newton Raphson Method. But im new to MATLAB and can't figure it out by myself.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/525329/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/525334/image.png)
Here's my Code;
clc; clear all
f_o =0.527;
f_i = 0.506;
Z = 8;
D_w = 10.32;
rho_0 = (f_i+f_o-1)*D_w;
F_a =2600;
alpha_no = 7.61;
C_delta = 7.14*10^5;
LHS=F_a/(Z*C_delta*rho_0^3/2);
syms rho_a
f = @(rho_a) ((sin(alpha_no)+rho_a)/((cos(alpha_no)^2+(sin(alpha_no)+rho_a)^2))^1/2)*(((cos(alpha_no)^2+(sin(alpha_no)+rho_a)^2))^1/2)-1^3/2;
fd = diff(f(rho_a));
rho_a = 10^-6;
for i=1:100000
rho_a = rho_a - f./fd;
f=rho_a;
if abs(f-LHS/LHS)<=10^-4
break
end
end
0 Kommentare
Antworten (1)
Jemima Pulipati
am 23 Feb. 2021
Hello,
From my understanding, you want to implement the Newton Raphson method in MATLAB.
The following answer from the community might be of relevance to you.
The following file exchange submission might also help you.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!