?? ex622.m
字號(hào):
A=[2 0 0 1;0 4 1 3;0 0 4 1;0 0 0 2];B=[1;0;1;2];C=[1 1 0 0]; %系統(tǒng)狀態(tài)方程模型
n=length(A); %求系統(tǒng)階次n
Q=ctrb(A,B); %求解系統(tǒng)可變換矩陣
m=rank(Q); %求系統(tǒng)可控性矩陣的秩m
if m==n %if-else-end程序判斷系統(tǒng)是否完全可控,滿足m=n系統(tǒng)狀態(tài)完全可控
Ac1=inv(Q)*A*Q; %
Bc1=inv(Q)*B;Cc1=C*Q; % ;
disp('System is controllable.');
disp('System First Controllable Canonnical Form is:'); Ac1,Bc1,Cc1
disp('The Transformation Martrix is:');Q
else %m<n系統(tǒng)狀態(tài)不完全可控
disp('system state Variable cannot be totally controlled');
disp('The rank of System Controllable Martix is:');m %可控的狀態(tài)變量數(shù)
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -