What is wrong with this?
3 次查看(过去 30 天)
显示 更早的评论
Hey I wrote:
X=linspace (0,1,8)
Y=A (13:20,2)
(I had "A" form my last program)
P=polyfit (X,Y,7)
And it says error using polyfit X and Y vectors must be the same size! But they are same sized!!!I don't know what's wrong with it!
0 个评论
采纳的回答
the cyclist
2016-1-5
They have the same number of elements, but they are not the same shape. You need to transpose one of them.
3 个评论
the cyclist
2016-1-5
P=polyfit(X,Y.',7)
FYI, you could have found this by trying
docsearch transpose
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!