After you obtain the handle for FVTool, you can control some aspects of FVTool from the command line. In addition to the standard Handle Graphics® properties (see Handle Graphics in the MATLAB® documentation), FVTool has the following properties:
'Analysis'
— displays the specified type of analysis plot.
The following table lists all analysis types and how to invoke them. Note that the only
analyses that use filter internals are magnitude response estimate and round-off noise
power, which are available only with the DSP System Toolbox™ product.
Analysis Type | Analysis Option |
---|---|
Magnitude plot |
|
Phase plot |
|
Magnitude and phase plot |
|
Group delay plot |
|
Phase delay plot |
|
Impulse response plot |
|
Step response plot |
|
Pole-zero plot |
|
Filter coefficients |
|
Filter information |
|
Magnitude response estimate (available only with the
DSP System Toolbox product, see |
|
Round-off noise power (available only with the DSP System Toolbox product, see |
|
'Grid'
— controls whether the grid is
'on'
or 'off'
'Legend'
— controls whether the legend is
'on'
or 'off'
'Fs'
— controls the sampling frequency of filters in FVTool.
The sampling frequency vector must be of the same length as the number of filters or a
scalar value. If it is a vector, each value is applied to its corresponding filter. If it
is a scalar, the same value is applied to all filters.
SosViewSettings
— (This option is available only if you have the
DSP System Toolbox product.) For second-order sections filters, this controls how the filter is
displayed. The SOSViewSettings
property contains an object so you must
use this syntax to set it:
set(h.SOSViewSettings,'View',
,
where viewtype
)viewtype
is one of the following:
'Complete'
— Displays the complete response of the
overall filter
'Individual'
— Displays the response of each section
separately
'Cumulative' — Displays the response for each section accumulated with each prior section. If your filter has three sections, the first plot shows section one, the second plot shows the accumulation of sections one and two, and the third plot show the accumulation of all three sections.
You can also define whether to use SecondaryScaling
, which
determines where the sections should be split. The secondary scaling points are the
scaling locations between the recursive and the nonrecursive parts of the section. The
default value is false
, which does not use secondary scaling. To
turn on secondary scaling, use this syntax:
set(h.SOSViewSettings,'View','Cumulative',true)
'UserDefined'
— Allows you to define which sections to
display and the order in which to display them. Enter a cell array where each section
is represented by its index. If you enter one index, only that section is plotted. If
you enter a range of indices, the combined response of that range of sections is
plotted. For example, if your filter has four sections, entering
{1:4}
plots the combined response for all four sections, and
entering {1,2,3,4}
plots the response for each section
individually.
Note
You can change other properties of FVTool from the command line using the
set
function. Use get(h)
to view property tags and
current property settings.
You can use the following methods with the FVTool handle.
addfilter(h,filtobj)
adds a new filter to FVTool. The new filter,
filtobj
, must be a dfilt
filter object. You can
specify the sampling frequency of the new filter with
addfilter(h,filtobj,'Fs',10)
.
setfilter(h,filtobj)
replaces the filter in FVTool with the filter
specified in filtobj
. You can set the sampling frequency as described
above.
deletefilter(h, index)
deletes the filter at the FVTool cell array
index
location.
legend(h,str1,str2,...)
creates a legend in FVTool by associating
str1
with filter 1, str2
with filter 2, etc. See
legend
.