运行后总是出现如下错误提示:
??? Error using ==> fzero
FZERO cannot continue because user supplied function_handle ==> fz
failed with the error below.
Undefined function or variable 'a'.
但如果我将参数a=1;b=2;c=3;移到子程序中,变为:
子程序:
function f=fz(x)
a=1;b=2;c=3;
f=a.*x+b./x+c;