12秒88 发表于 2008-2-25 22:10

fun1文件MATLAB fsolve 解非线性方程

fun1文件
funtion y=fun1(x)
y=

命令窗口
>> x0=
x0 =
    0.1000    0.1000
>> x = fsolve(@fun1,x0)
错误:
Warning: feval on script names will not work, or may work differently,
in a future version of MATLAB.To make your code insensitive to any change
and to suppress this warning message:
- Either change the script to a function.
- Or use eval instead of feval.
The script file in question is fun1.
> In fsolve at 180
??? Attempt to execute SCRIPT fun1 as a function.
Error in ==> fsolve at 180
      fuser = feval(funfcn{3},x,varargin{:});
??? try open('>> x0=
             |
Error: Missing variable or function.
解非线性方程

怎解?
怎么解呀?
哪里错了?

gyCai 发表于 2008-2-26 14:27

看提示应该是函数定义不对或者参数匹配之类的。
matlab不懂,帮顶一下。

xinggg22 发表于 2008-3-1 21:45

好久没有用过matlab~~~~~~~
页: [1]
查看完整版本: fun1文件MATLAB fsolve 解非线性方程