%% Variable-Size Signal Support Example
% Note: If you are using R2016a or an earlier release, replace each call to the object with the equivalent step syntax. For example, obj(x) becomes  step(obj,x).
% Create a dsp.FIRHalfbandDecimator System object™. The input signal contains 10 channels, with 1000 samples in each channel.

FIRHalfband = dsp.FIRHalfbandDecimator;
input = randn(1000,10);

%
% Lock the object by running the algorithm.

FIRHalfband(input);
isLocked(FIRHalfband)

%
% Change the frame size of the input to 800 without releasing the object.

input = randn(800,10);
FIRHalfband(input);

% The System object runs without error.
% Copyright 2012 The MathWorks, Inc.