How can I represent this state space in MATLAB Code?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
taleem mat
am 26 Jan. 2022
Kommentiert: Les Beckham
am 27 Jan. 2022
% Code
A=[ 0 1 0 0 ;
0 0 -7sin(0.05) 0;
0 0 0 1;
0 0 0 -38;];
B=[ 0 0 0 71]';
c=[1 0 0 0];
f=ss(A,B,C,D);
close loop=feedback(f,1)
Is this representation of the state space with sine in it is true ?
0 Kommentare
Akzeptierte Antwort
Les Beckham
am 26 Jan. 2022
Bearbeitet: Les Beckham
am 26 Jan. 2022
You need to replace 7sin(0.05) with 7*sin(0.05).
Also, Matlab variable names can't have a space in them so close loop is not a valid variable name.
And your definition of C was in lower case.
And you didn't define D;
A = [ 0 1 0 0 ;
0 0 -7*sin(0.05) 0;
0 0 0 1;
0 0 0 -38;];
B = [0 0 0 71]';
C = [1 0 0 0];
D = 0; % Assuming no direct effect of the input on the output
f=ss(A,B,C,D);
closed_loop=feedback(f,1)
8 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations 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!