该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
代码:
x=0:0.5:9.5;
y=[379.1 369.9 360.9 351.7 343.8 336.4 330 324.4 320.5 319.1 318.2 317.4 316.7 316 315.4 314.7 313.9 311.5 302.6 294.1];
p11=polyfit(x,y,11);
f11=poly2str(p11,'x');
x1=0:0.5:9.5;
y11=polyval(p11,x1);
plot(x,y,'rp',x1,y11)
z11=diff(f11,1)
报错:
Warning: Polynomial is badly conditioned. Add points with distinct X
values, reduce the degree of the polynomial, or try centering
and scaling as described in HELP POLYFIT.
> In polyfit at 80
In Untitled at 3
??? Error using ==> sym.sym>expression2ref at 2408
Error: Unexpected 'identifier' [line 1, col 12]
Error in ==> sym.sym>char2ref at 2378
s = expression2ref(x);
Error in ==> sym.sym>tomupad at 2147
S = char2ref(x);
Error in ==> sym.sym>sym.sym at 102
S.s = tomupad(x,'');
Error in ==> char.diff at 9
y = diff(sym(f),varargin{:});
Error in ==> Untitled at 8
z11=diff(f11,1)