Question: Please explain how to use the MATLAB script below to solve the following question. Use code to find zero f(x) = ex - 3x2 in

Please explain how to use the MATLAB script below to solve the following question.

Use code to find zero f(x) = ex - 3x2 in the interval [-1,0].

plot the graph with labels

code is as follows :

function[r,fr,logre]=secantV2(fh,xnm1,xn) steps=0; maxsteps=20; re=1e-8; myrel=1; fnm1=fh(xnm1); fn=fh(xn); if abs(fn)>abs(fnm1) temp=xn; xn=xnm1; xnm1=temp; temp=fn; fn=fnm1; fnm1=temp; end; while myrel>re && steps

please include a pic of the code working and a short explanation, I will rate your answer.

Thanks

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 Databases Questions!