Input argument
Mostrar comentarios más antiguos
function y = f1(x)
% A univariate function with a simple zero
syms x
y = cos(x) - x;
r = fzero('f1', 0.5)
It gives the following error
Error in ==> oct3 at 5 r = fzero('f1', 0.5) >>
Respuestas (2)
bym
el 1 de Nov. de 2011
try
r = fzero(@f1,.5)
Walter Roberson
el 2 de Nov. de 2011
0 votos
Why is the error in the file oct3 when all you show us is the file f1 ?
What is the error message you are getting?
1 comentario
fatma
el 2 de Nov. de 2011
Categorías
Más información sobre Nonlinear Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!