The function I need to plot is y = exp(-0.3*t)*(2*cos(2*t) + 4*sin(2*t)) for the range of values of t between 0 and 2*pi.
I entered the following commands on MATLAB:
>> t=linspace(0,2*pi,101);
>> y=exp(-0.3*t)*(2*cos(2*t) + 4*sin(2*t));
And I come up with the following error:
Error using *
Inner matrix dimensions must agree.
I don't know why. Can someone point out why and suggest the correct command line argument?
Thanks!
.*rather than*for element wise multiplication:y=exp(-0.3*t).*(2*cos(2*t) + 4*sin(2*t));- user2999345