www.gusucode.com > ident 案例代码 matlab源码程序 > ident/EstimateStateSpaceModelandSpecifyEstimationOptionsExample.m

    %% Estimate State-Space Model and Specify Estimation Options  

% Copyright 2015 The MathWorks, Inc.


%% 
% Load estimation data. 
load iddata2 z2
%% 
% Specify the estimation options. 
opt = n4sidOptions('Focus','simulation','Display','on');  
%% 
% Estimate the model. 
nx = 3;
sys = n4sid(z2,nx,opt); 
%%
% |sys| is a third-order, state-space model.