www.gusucode.com > control 案例程序 matlab源码代码 > control/SpecifyStateAndInputNamesForDiscreteTimeStateSpaceModelExample.m
%% Specify State and Input Names for Discrete-Time State-Space Model %% % Create state-space matrices and specify sample time. A = [0 1;-5 -2]; B = [0;3]; C = [0 1]; D = 0; Ts = 0.05; %% % Create state-space model, specifying the state and input names. sys = ss(A,B,C,D,Ts,'StateName',{'Position' 'Velocity'},... 'InputName','Force'); %% % The number of state and input names must be consistent with the % dimensions of |A|, |B|, |C|, and |D|.