My function in matlab is:
t=0:0.01:8;
w=1;
y=1-((exp(-0.6*w*t))/(sqrt(1-0.6^2)))*sin(w.*sqrt(1-0.6^2)+acos(0.6));
plot(t,y);
hold on;
w=5;
y=1-((exp(-0.6*w*t))/(sqrt(1-0.6^2)))*sin(w.*sqrt(1-0.6^2)+acos(0.6));
plot(t,y)
but every time I´ll run it I get the following message:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> Analytiskt_w0_w5 at 3
y=1-((exp(-0.6*ω*t))/(sqrt(1-0.6^2)))*sin(ω.*t.*sqrt(1-0.6^2)+acos(0.6));
I don´t see where I do wrong
Any help is appreciated
t=0:0.01:8;
w=1;
y=1-((exp(-0.6*w*t))/(sqrt(1-0.6^2)))*sin(w.*sqrt(1-0.6^2)+acos(0.6));
plot(t,y);
hold on;
w=5;
y=1-((exp(-0.6*w*t))/(sqrt(1-0.6^2)))*sin(w.*sqrt(1-0.6^2)+acos(0.6));
plot(t,y)
but every time I´ll run it I get the following message:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> Analytiskt_w0_w5 at 3
y=1-((exp(-0.6*ω*t))/(sqrt(1-0.6^2)))*sin(ω.*t.*sqrt(1-0.6^2)+acos(0.6));
I don´t see where I do wrong
Any help is appreciated