Accelerating the pace of engineering and science

• Trials

phasez

Unwrapped phase response for filter

Syntax

[phi,w]=phasez(hfilt)
[phi,w]=phasez(hfilt,n)
phasez(hfilt)
[phi,w] = phasez(hs)
[phi,w] = phasez(hs,n)
[phi,w] = phasez(hs,Name,Value)
phasez(hs)

Description

phasez returns the unwrapped phase response based on the current filter coefficients. This section describes phasez operation for adaptive filters, discrete-time filters, multirate filters, and filter System objects. For more information about optional input arguments for phasez, refer to phasez in Signal Processing Toolbox™ documentation.

[phi,w]=phasez(hfilt) returns the phase response phi of the filter hfilt and the corresponding frequencies w at which the function evaluates the phase response. The phase response is evaluated at 8192 points equally spaced around the upper half of the unit circle.

[phi,w]=phasez(hfilt,n) returns the phase response phi of the filter hfilt and the corresponding frequencies w at which the function evaluates the phase response. The phase response is evaluated at n points equally spaced around the upper half of the unit circle.

phasez(hfilt) displays the phase response of hfilt in the Filter Visualization Tool (FVTool).

[phi,w] = phasez(hs) returns a phase response for the filter System object™ hs using 8192 samples.

[phi,w] = phasez(hs,n) returns a phase response for the filter System object hs using n samples.

[phi,w] = phasez(hs,Name,Value) returns a phase response with additional options specified by one or more Name,Value pair arguments.

phasez(hs) uses FVTool to plot the phase response of the filter System object hs.

Input Arguments

 hfilt hfilt is either: An adaptive adaptfilt, discrete-time dfilt, or multirate mfilt filter objectA vector of adaptive, discrete-time, or multirate filter objects The multirate filter response is computed relative to the rate at which the filter is running. When you specify fs (the sampling rate) as an input argument, phasez assumes the filter is running at that rate. For multistage cascades, phasez forms a single-stage multirate filter that is equivalent to the cascade. It then computes the response relative to the rate at which the equivalent filter is running. phasez does not support all multistage cascades. The function analyzes only those cascades for which there exists an equivalent single-stage filter. As an example, consider a 2-stage interpolator where the first stage has an interpolation factor of 2 and the second stage has an interpolation factor of 4. In this case, an equivalent single-stage filter exists with an overall interpolation factor of 8. phasez uses this equivalent filter for the analysis. If a sampling frequency fs is specified as an input argument to phasez, the function interprets fs as the rate at which the equivalent filter is running. hs Filter System object. The following Filter System objects are supported by this analysis function: n Number of samples. For an FIR filter where n is a power of two, the computation is done faster using FFTs. Default: 8192

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' 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. When you do not specify the arithmetic for non-CIC structures, 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. CIC structures only support fixed-point arithmetic.

Output Arguments

 phi Complex, n-element phase response vector. If hfilt is a vector of filters, phi is a complex, length(hfilt)-by-n matrix of phase response vectors whose columns correspond to each filter in hfilt. If n is not specified, the function uses a default value of 8192. For adaptive filters, phi is the instantaneous phase response. w Frequency vector of length n, in radians/sample. w consists of n points equally spaced around the upper half of the unit circle (from 0 to π radians/sample). If hfilt is a vector of filters, w is a complex, length(hfilt)-by-n matrix of phase response vectors whose columns correspond to each filter in hfilt. If n is not specified, the function uses a default value of 8192.