Inner matrix dimensions must agree.

1 次查看(过去 30 天)
koke
koke 2013-4-19
this is matlab verrrry simple program but i have verrrry simple problem :) this is the error ( Error using * Inner matrix dimensions must agree.
Error in vib (line 9)
x=(a1+a2*t)*exp(-wn*t); )
and that is the program
vo=input('vo=');
xo=input('xo=');
wn=input('wn=');
syms t;
syms wn;
a1=xo;
a2=vo+(wn*xo);
t=0:1;
x=(a1+a2*t)*exp(-wn*t);
nx=double( subs(x,'t', t));
figure(1);
plot(t,nx);
what can i do to solve this program

回答(1 个)

Walter Roberson
Walter Roberson 2013-4-20
Use .* instead of *

类别

Help CenterFile Exchange 中查找有关 Function Creation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by