。。。。。从y里面把b和c的部分剪掉,然后就不要用二次拟合了,用1次,p=polyfit(x^2,y-bx-c,1),这样就行了!
%这是我编写的,结果a=0.025548
b=0.75;c=0;
x=[29.3,44,58.7,73.3,88,102.7,117.3];
y=[42,73.5,116,173,248,343,464];
y1=y-b*x-c;
x1=x.^2;
fun=inline('a*x1','a','x1');
a0=0.5;
a=lsqcurvefit(fun,a0,x1,y1)
p=polyfit(x.^2,y-b.*x-c,1)