reorder(hd,filter_type) reorders hd in
a way suitable for the specified filter type. This reordering mode
can be especially helpful for fixed-point implementations where the
order of the filter sections can significantly affect your filter
performance.

reorder(hd,dir_flag) specifies
rearranges the sections according to proximity to the origin of the
poles of the sections.

reorder(hd,dir_flag,sv) reorders
scale values in addition to rearranging sections according to pole-origin
proximity.

reorder(hs,...) rearranges
the sections of the filter System object™ hs according
to any of the preceding input arguments.

reorder(hs,...,Name,Value) rearranges
the sections of the filter System object hs with
additional options specified by one or more Name,Value pair
arguments.

Input Arguments

hd —

hs —

dsp.BiquadFilter filter System object.

order —

Vector of indices used to reorder the filter sections. order does
not need to contain all of the indices of the filter. Omitting one
or more filter section indices removes the omitted sections from the
filter. You can use a logical array to remove sections from the filter,
but not to reorder it.

numorder —

Vector of indices used to reorder the numerator. numorder and denorder must
be the same length.

denorder —

Vector of indices used to reorder the numerator. numorder and denorder must
be the same length.

svorder —

Independent reordering of scale values. When svorder is
not specified, the scale values are reordered with the numerator.
The output scale value always remains on the end when you use the
argument numorder to reorder the scale values.

Filter type. The 'auto' option and automatic
ordering only apply to filters that you used fdesign to
create. With the 'auto' option as an input argument, reorder automatically
rearranges the filter sections depending on the specification response
type of the design.

dir_flag — Direction options:'down' | 'up'

Pole direction flag. When dir_flag is 'up',
the first filter section contains the poles closest to the origin,
and the last section contains the poles closest to the unit circle.
When ir_flag is 'down', the
sections are ordered in the opposite direction. reorder always
pairs zeros with the poles closest to them.

sv — Scale value options:'poles' | 'zeros'

Reorder scale values according to poles or zeros. By default
the scale values are not reordered when you use the dir_flag input
argument.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument
name and Value is the corresponding
value. Name must appear
inside single quotes (' ').
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN.

'Arithmetic' — Value types:‘double' | 'single' | 'fixed'

For filter System object inputs only, specify the arithmetic
used during analysis. When you specify 'double' or 'single',
the function performs double- or single-precision analysis. When you
specify 'fixed' , the arithmetic changes depending
on the setting of the CoefficientDataType property
and whether the System object is locked or unlocked.

The function assumes that the coefficient data type is signed,
16 bit, and autoscaled. The function performs fixed-point analysis
based on this assumption.

Unlocked

'Custom'

The function performs fixed-point analysis based on the setting
of the CustomCoefficientsDataType property.

Locked

'Same as input'

When the input data type is 'double' or 'fixed',
the function assumes that the coefficient data type is signed, 16-bit,
and autoscaled. The function performs fixed-point analysis based on
this assumption.

Locked

'Custom'

The function performs fixed-point analysis based on the setting
of the CustomCoefficientsDataType property.

When you do not specify the arithmetic, the function uses double-precision
arithmetic if the filter System object is in an unlocked state.
If the System object is locked, the function performs analysis
based on the locked input data type.

Examples

Being able to rearrange the order of the sections in a filter
can be a powerful tool for controlling the filter process. This example
uses reorder to change the sections of a df2sos filter.
Let reorder do the reordering automatically in
the first example. In the second, use reorder to
specify the new order for the sections.