matlab编程为什么会运行不了。
Show older comments
x=0:25:39;
y=[4 7.533333 10 14.13793 15.43333 14.2 16.1 15.83333 8.833333 7.133333 5.633333 3.606061 3.060606 2.30303 1.636364];
A=polyfit(x,y,3);
z=polyval(A,x);
plot(x,y,'k+',x,z,'r') %
显示错误:
>> Untitled1
错误使用 polyfit (line 47)
X 和 Y 矢量的大小必须相同。
出错 Untitled1 (line 3)
A=polyfit(x,y,2)
>> Untitled1
错误使用 polyfit (line 47)
X 和 Y 矢量的大小必须相同。
出错 Untitled1 (line 3)
A=polyfit(x,y,3)
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!