I am trying to plot y=x^2sin(x), where x is from 0 to 2pi. I have defined x using the linspace command, but matlab does not agree with the (x.^2) part. Is there a concept I am missing?
12 次查看(过去 30 天)
显示 更早的评论
>> x=linspace(0,2*pi);
>> y=(x.^2)*sin(x);
Error using *
Inner matrix dimensions must agree.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!