MATLAB Answers

Newton Raphson on MATLAB

1 view (last 30 days)
Türker Demiröz
Türker Demiröz on 19 Feb 2021
Answered: Jemima Pulipati on 23 Feb 2021
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.
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;
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;
if abs(f-LHS/LHS)<=10^-4

Answers (1)

Jemima Pulipati
Jemima Pulipati on 23 Feb 2021
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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by