matlab程序问题 20
x=0:0.5:3;y=[00.47940.84150.98150.91260.59850.1645];wfun=ones(1,6);phifun=@(x)[ones(s...
x=0:0.5:3;
y=[0 0.4794 0.8415 0.9815 0.9126 0.5985 0.1645];
wfun=ones(1,6);
phifun=@(x)[ones(size(x));x;x.^2;cos(x);exp(x);sin(x)];
[A,b,p]=Least_square(wfun,phifun,x,y)
syms x
digits(4)
Phifun=[1;x;x.^2;cos(x);exp(x);sin(x)];
y=vpa(p*Phifun)
??? phifun=@(x)[ones(size(x));x;x.^2;cos(x);exp(x);sin(x)];
|
Error: "identifier" expected, "(" found.
应该怎么改?? 展开
y=[0 0.4794 0.8415 0.9815 0.9126 0.5985 0.1645];
wfun=ones(1,6);
phifun=@(x)[ones(size(x));x;x.^2;cos(x);exp(x);sin(x)];
[A,b,p]=Least_square(wfun,phifun,x,y)
syms x
digits(4)
Phifun=[1;x;x.^2;cos(x);exp(x);sin(x)];
y=vpa(p*Phifun)
??? phifun=@(x)[ones(size(x));x;x.^2;cos(x);exp(x);sin(x)];
|
Error: "identifier" expected, "(" found.
应该怎么改?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询