Community Profile

photo

Tianna


University of Arizona

Active since 2012

Statistics

Content Feed

View by

Question


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?
>> x=linspace(0,2*pi); >> y=(x.^2)*sin(x); Error using * Inner matrix dimensions must agree.

meer dan 11 jaar ago | 1 answer | 0

1

answer