Simple problem of MATLAB related to the fzero function To so

Simple problem of MATLAB related to the fzero function

To solve this you need to use fzero function

You might need global function

All I need is correct code to solve this problem

You guys should give me 2 scripts of the code

You guys can ignore the part [an appropriately modified form ~~ the problem 3]

Solution

clc
clear all

%%

r=0:0.5:10;
tanroot=zeros(size(r));

x0=[0,1.57]; % interval

for i=1:length(r)
fun= @(x) x*tan(x)-r(i);
x=fzero(fun,x0);
  
tanroot(i)=x;
  
end

Simple problem of MATLAB related to the fzero function To solve this you need to use fzero function You might need global function All I need is correct code to

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site