How can I represent this state space in MATLAB Code?
5 次查看(过去 30 天)
显示 更早的评论
% 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 个评论
采纳的回答
Les Beckham
2022-1-26
编辑:Les Beckham
2022-1-26
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!