|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
clc
clear
data=xlsread('D:\wjt\资料\其他\nsxyhjffzq');
xdata1=data(:,1);
ydata1=data(:,2);
xs=xdata1(1);ffs=ydata1(1);
x0=[1000,5];
fun1=inline('ffs+(xdata1-xs)/(x1(1)*(1+ffs/x1(1))-(xdata1-xs))*(x1(2)+ffs)','x1','xdata1','ffs','xs')
[x1,resnorm1]=lsqcurvefit(fun1,x0,xdata1,ydata1); 就是这个命令的错误。请各位大佬指教指教!多谢先!
出现的问题如下:
??? Error using ==> D:\matlab6.1\toolbox\optim\private\lsqncommon
User supplied expression or inline function ==> ffs+(xdata1-xs)/(x1(1)*(1+ffs/x1(1))-(xdata1-xs))*(x1(2)+ffs)
failed with the following error:
Error using ==> inline/feval
Not enough inputs to inline function.
Error in ==> D:\matlab6.1\toolbox\optim\lsqcurvefit.m
On line 129 ==> [x,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ... |
|