%% Design a Multistage Interpolator
% This example designs a minimum-order, multistage Nyquist interpolator.

l = 15;   % Interpolation factor. Also the Nyquist band.
tw = 0.05; % Normalized transition width
ast = 40;   % Minimum stopband attenuation in dB
d = fdesign.interpolator(l,'nyquist',l,'tw,ast',tw,ast);
msMinInterp = design(d,'multistage','SystemObject',true);
fvtool(msMinInterp);

%
% Design a multistage lowpass interpolator with an interpolation factor of 8.

m = 8; 
d = fdesign.interpolator(m,'lowpass');
% Use halfband filters if possible.
msInterp = design(d,'multistage','Usehalfbands',true,'SystemObject',true); 
fvtool(msInterp);

% Copyright 2012 The MathWorks, Inc.