Question: The code can not be run, and i dont know why, please help me with this code! Even I change the duplicate name it still

The code can not be run, and i dont know why, please help me with this code! Even I change the duplicate name it still can not be run.
Thank you so much
The code can not be run, and i dont know why, please
help me with this code! Even I change the duplicate name it

NAVIGATE EDIT BREAKPOINTS Yunbin Hao Desktop Numerial Method Assignment Assignment 1 Editor - C:Users\Yunbin Hao\Desktop\Numerial Method Assignment Assignment 1\secant.m secant.m X + Implement secant method X = 0; y 1: LI fun = @(x) X-2*exp(-x): answer - secantm (fun,x,y); Q function p = secantm (f,x,y) i = 2; x (2)=y; El for i = 2:10 x(i+1) = x(i)-f(x(i))*(x(x))/(f(x(i-1))-f(x(i))); err = abs((x(i+1)-x(i))/x(i+1)); if (err > secant Array indices must be positive integers or logical values. Error in secant>secantm (line 10) x(1+1) = x (1)-f(x(i))*(x (x))/(f(x(1-1))-f(x(1))); Error in secant (line 5) answer = secantm (fun, x,y); N 111 GATE EDIT BREAKPOINTS RUN unbin Hao Desktop Numerial Method Assignment Assignment 1 Editor - C:\Users\Yunbin Hao\Desktop\Numerial Method Assignment Assignment 1\secant secant. m x + $Implement secant method x = 0; y = 1; fun = @ (x) x-2*exp(-x): answer = secant (fun,X,Y): function p = secant (f,x,y) i = 2; x(2)=y; for i = 2:10 x(i+1) - x(1)-f(x(i))*(x(x))/(f(x(i-1))-f(x(1))); err = abs((x(i+1) -x(i))/x(i+1)); if (err > secant Error: File: secant.m Line: 6 Column Tunction with duplicate name secant" cannot be defined. x > script

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!