User`s guide
1 Data Processing
The following example illustrates how resample avoids folding effects:
% Construct fourth-order MA-p roce ss
m0 = idpoly(1,[ ],[1 1 1 1]);
% Generate error signal
e = idinput(2000,'rgs');
e = iddata([],e,'Ts',1);
% Simulate the output using error signal
y = sim(m0,e);
% Estimate signal spectrum
g1 = spa(y);
% Estimate spectrum of modified signal includ ing
% every fourth sample of the original signal .
% This command automatically sets Ts to 4.
g2 = spa(y(1:4:2000));
% Plot frequency response to view folding effects
ffplot(g1,g2)
% Estimate spectrum after prefiltering that d oes not
% introduce folding effects
g3 = spa(resample(y,1,4));
figure
ffplot(g1,g3)
1-104