%% Get Interpolation Factors
% Get interpolation factors of each filter stage of a dsp.DigitalUpConverter System object™.
% Create a dsp.DigitalUpConverter System object with the default settings. Using the getInterpolationFactors function, obtain the interpolation factors of each stage of the object.

upConv = dsp.DigitalUpConverter
M = getInterpolationFactors(upConv) %#ok

%
% The InterpolationFactor property of the object is set to 100. By default, the output M is a 1-by-3 vector, where each element in the vector is a factor of the overall interpolation factor.
%
% When you set the InterpolationFactor property to a 1-by-2 vector, the object bypasses the first filter stage and sets the interpolation factor of the second and third filtering stages to the values in the first and second vector elements, respectively. The output of the getInterpolationFactors function is now a 1-by-2 vector.

upConv.InterpolationFactor = [10 10]
M = getInterpolationFactors(upConv)

%
% Copyright 2018 The MathWorks, Inc.