# How to evaluate an impulse/response model in MATLAB

This is my first experience in signal processing, so don't treat me badly :) However, I have estimated an impulse-response model using the MATLAB System Identification toolbox. The output, validated on unseen data, has a good fit, approximately around 80%. However, when I export the object imp - its type is idtf - containing the estimated model, I don't know how to evaluate it on unseen data. Obviously, in the structure is contained the polynomial structure of the model, but it bothers me to write a function to estimate it... Is there any quicker procedure?

• Have you tried methods idtf? struct(obj) actually lets you see what is there. – Stanley Pawlukiewicz Aug 20 '17 at 17:43

One way of evaluating the model response to arbitrary data is the lsim command. As you don't provide more information with respect to your data and/or model an example below (taken straight from the MATLAB help). See help lsim or doc lsim for more information.

% create model
%
num = [1 4];
den = [1 20 5];
G = idtf(num,den);

% evaluate response
%
t = 0:0.01:5;
u = sin(t);
y = lsim(G,u,t);

% plot
%
figure;
plot(t,y)


In addition, if desired, you can evaluate the model impulse, step and/or frequency response using the impulse, step and bode commands.