Filter Design Toolbox    
mfilt.holdinterp

Construct an FIR hold interpolator mfilt object

Syntax

Description

hm = mfilt.holdinterp(l) returns the object hm that represents a hold interpolator with the interpolation factor l. To work, l must be an integer. When you do not include l in the calling syntax, it defaults to 2. To perform interpolation by noninteger amounts, use one of the fractional interpolator objects, such as mfilt.firsrc or mfilt.firfracinterp.

When you use this hold interpolator, the samples added to the input signal between existing samples have the value of the most recent sample from the original signal. Thus you see something like a staircase profile where the interpolated samples form a plateau between the previous and next original samples. The example demonstrates this profile clearly. Compare this to the interpolation process for other interpolators in the toolbox, such as mfilt.linearinterp.

Input Arguments

The following table describes the input arguments for creating hm.

Input Argument
Description
l
Interpolation factor for the filter. l specifies the amount to increase the input sampling rate. It must be an integer. When you do not specify a value for l it defaults to 2.

mfilt.holdinterp Object Properties

Every multirate filter object has properties that govern the way it behaves when you use it. Note that many of the properties are also input arguments for creating mfilt.holdinterp objects.The next table describes each property for an mfilt.holdinterp filter object.

Name
Values
Description
FilterStructure
String
Reports the type of filter object, such as a decimator or fractional integrator. You cannot set this property--it is always read only and results from your choice of mfilt object.
InterpolationFactor
Integer
Interpolation factor for the filter. l specifies the amount to increase the input sampling rate. It must be an integer.
ResetBeforeFiltering
'off' or 'on'
Determine whether the filter states get restored to zero for each filtering operation
States
Double array
Filter states. states defaults to a vector of zeros that has length equal to nstates(hm)
NumSamplesProcessed
Integer
Returns the number of samples processed during filtering.

Examples

To see the effects of hold based interpolation, interpolate an input sine wave from 22.05 to 44.1 KHz. Among other things to see, note that each added sample retains the value of the most recent original sample.

See Also

mfilt.linearinterp, mfilt.firinterp, mfilt.firfracinterp, mfilt.cicinterp, mfilt.cicinterpzerolat


  mfilt.firtdecim mfilt.linearinterp 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS