Error using plot Conversion to double from sym is not possible.
Afficher commentaires plus anciens
syms t
f=2508+5.185*sin(0.00737*t)+3.813*sin(0.00737*t-4.318)+3.854*sin(0.00737*t-22.622)+5.103*sin(0.00737*t-154.853)+5.482*sin(0.00737*t-74.341);
j1=0.03;
j2=0.03;
j3=0.03;
j4=0.03;
jrec=0.035;
kl=4.00e4;
k2=4.00e4;
k3=4.00e4;
J = [j1 0 0 0 ;0 j2+jrec 0 0 ;0 0 j3+jrec 0 ;0 0 0 j4+jrec ];
K = [kl -kl 0 0 ;-kl kl+k2 -k2 0 ;0 -k2 k2+k3 -k3;0 0 -k3 k3];
T = J*diff(f)+K*t;
for t=0:720;
plot(t,T)
end;
T;
Réponses (1)
KSSV
le 24 Mar 2017
Your T is a class of sym, it got variable t in it. First substitute value of t, then convert it to double and then plot.
Like if t = 0 ;
t = 0 ;
T0 = subs(T,t) ;
T0 = double(T0) ;
Your T is matrix of 4X4 for each time step.
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!