Question: Can you please improve my Matlab code(The secant method) such that i can solve every Bl given that theta is an interval from 0:0.1:42 %Code%

Can you please improve my Matlab code(The secant method) such that i can solve every Bl given that theta is an interval from 0:0.1:42

%Code%

clear all

clc

M2=5;

r=1.4;

theta=20;

n=length(theta)

ciL=35;

cim1L=34;

fi=((2*cotd(ciL).*((M2.^2).*((sind(ciL)).^2)-1))./((M2.^2).*(r+cosd(2*ciL))+2))-tand(theta);

while abs(fi)>1.0e-3

for i=1:n

fi(i)=((2*cotd(ciL).*((M2.^2).*((sind(ciL)).^2)-1))./((M2.^2).*(r+cosd(2*ciL))+2))-tand(theta);

fim1=((2*cotd(cim1L).*((M2.^2).*((sind(cim1L)).^2)-1))./((M2.^2).*(r+cosd(2*cim1L))+2))-tand(theta);

cip1L=ciL-(ciL-cim1L)*fi/(fi-fim1);

cim1L=ciL;

ciL=cip1L;

end

end

BL=cip1L

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!