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

    %% Compare Estimated Model to Measured Data  

%% 
% Estimate a state-space model for measured data. 
load iddata1 z1;
sys = ssest(z1,3);

%%
% |sys|, an |idss| model, is a continuous-time state-space model.  

%% 
% Compare the predicted output for 10 steps ahead to the measured output. 
prediction_horizon = 10;
compare(z1,sys,prediction_horizon);     
%%
% To change display options in the plot, right-click the plot to access 
% the context menu. For example, to plot the error between the predicted
% output and measured output, select *Error Plot* from the context menu.