MATLAB Answers

matlab give me error when i use fzero to calculate zero of function

1 view (last 30 days)
fzero of function
fun = @sin; % function
x0 = 3; % initial point
x = fzero(fun,x0)

  5 Comments

Show 2 older comments
raffaele orlando
raffaele orlando on 14 Mar 2020
Attempt to execute SCRIPT fzero as a function:
C:\Users\raffo\Documents\MATLAB\fzero.m
Error in Untitled2 (line 3)
x = fzero(fun,x0)
this is the error message , but if i use fsolve matlab give me a solution
Ameer Hamza
Ameer Hamza on 14 Mar 2020
As John expected, you have placed a script name fzero in MATLAB's path ?‍♂️. Change the name of script C:\Users\raffo\Documents\MATLAB\fzero.m to something else.

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 14 Mar 2020
Just go to the file location and rename the file as myFzero.m for example.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by