Error using mupadmex " MuPAD "
조회 수: 9 (최근 30일)
이전 댓글 표시
this is matlab verrrry simple program but i have verrrry simple problem :) this is the error Error using mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Error in sym/double (line 936)
Xstr = mupadmex('symobj::double', S.s, 0);
Error in vib (line 10)
nx=double( subs(x,'t',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);
x=(a1+a2*t)*exp(-wn*t);
t=0:0.5:1;
nx=double( subs(x,'t',t));
figure(1);
plot(t,nx);
what can i do to solve this program
댓글 수: 0
채택된 답변
bym
2013년 4월 19일
Don't define wn as symbolic
vo=input('vo=');
xo=input('xo=');
wn=input('wn=');
syms t;
%syms wn; comment this line
a1=xo;
a2=vo+(wn*xo);
x=(a1+a2*t)*exp(-wn*t);
t=0:0.5:1;
nx=double( subs(x,'t',t));
figure(1);
plot(t,nx);
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!