from Quick Start to System Identification by Nitin Skandan
Provide a easy to use quick start guide to do system identification with MATLAB.

identify.m
dataset = iddata(dout, din) ;
% th = n4sid(dataset, 1:5,'DisturbanceModel','None') ; % Model without disturbance
th = n4sid(dataset, 1:5) ; %State space model
% th = arx(dataset, [2 1 1]) ; %ARX model

figure(1), compare([dout din], th, 1) ;
disp('Is comparison okay - press any key') ;
pause;
[num, den] = tfdata(th) ;
trfn = tf(num, den, 0.01) 
con = d2c(trfn) 

Contact us at files@mathworks.com