Index exceeds array bounds; transfer function model.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
an Electrical Engineering Student
am 13 Apr. 2021
Bearbeitet: an Electrical Engineering Student
am 13 Apr. 2021
I'm modelling the dynamics of an inverted pendulum system. Here's my code:
m=0.1283; M=0.5; I=0.0107; g=9.81; L=0.5;
s=tf('s')
J=m*(L^2)/4+I;
H=M+m;
G=m*g*L/2;
E=m*L/2;
P=J*H-E^2;
format short
sys=1/(P/E*s^2-(E^2+P)*G/(J*E))
Which yields the following error:
Index exceeds array bounds.
Error in sym/subsref (line 859)
R_tilde = builtin('subsref',L_tilde,Idx);
Error in modelo_dominio_s_sin_friccion (line 5)
s=tf('s')
How can I fix it? I'm not sure why there appears to be an error with s=tf('s') when it appears exactly like that in the 'tf' documentation.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Assembly finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!