Documentation |
P-norm of filter
l = norm(ha)
l = norm(ha,pnorm)
l = norm(hd)
l = norm(hd,pnorm)
l = norm(hm)
l = norm(hm,pnorm)
All of the variants of norm return the filter p-norm for the object in the syntax, either an adaptive filter, a digital filter, or a multirate filter. When you omit the pnorm argument, norm returns the L2-norm for the object.
Note that by Parseval's theorem, the L2-norm of a filter is equal to the l2 norm. This equality is not true for the other norm variants.
l = norm(ha) returns the L2-norm of an adaptive filter.l = norm(ha,pnorm) adds the input argument pnorm to let you specify the norm returned. pnorm can be either
Frequency-domain norms specified by one of L1, L2, or Linf
Discrete-time domain norms specified by one of l1, l2, or linf
l = norm(hd) returns the L2-norm of a discrete-time filter.
l = norm(hd,pnorm) includes input argument pnorm that lets you specify the norm returned. pnorm can be either
Frequency-domain norms specified by one of L1, L2, or Linf
Discrete-time domain norms specified by one of l1, l2, or linf
By Parseval's theorem, the L2-norm of a filter is equal to the l2 norm. This equality is not true for the other norm variants.
IIR filters respond slightly differently to norm. When you compute the l2, linf, L1, and L2 norms for an IIR filter, norm(...,L2,tol) lets you specify the tolerance for the accuracy in the computation. For l1, l2, L2, and linf, norm uses the tolerance to truncate the infinite impulse response that it uses to calculate the norm. For L1, norm passes the tolerance to the numerical integration algorithm. Refer to Examples to see this in use. You cannot specify Linf for the norm and include the tol option.
l = norm(hm) returns the L2-norm of a multirate filter.
l = norm(hm,pnorm) includes argument pnorm to let you specify the norm returned. pnorm can be either
Frequency-domain norms specified by one of L1, L2, or Linf
Discrete-time domain norms specified by one of l1, l2, or linf
Note that, by Parseval's theorem, the L2-norm of a filter is equal to the l2 norm. This equality is not true for the other norm variants.
For the adaptive filter example, compute the 2-norm of an adaptfilt object, here an LMS-based adaptive filter.
Ha = adaptfilt.lms; % norm(ha) is zero because all coeffs are zero % Create some data to filter to generate filter coeffs x = randn(100,1); d = x + randn(100,1); [y,e] = filter(Ha,x,d); L2 = norm(Ha); % Now norm(ha) is nonzero
To demonstrate the tolerance option used with an IIR filter (dfilt object), compute the 2-norm of filter hd with a tolerance of 1e-10.
H =fdesign.lowpass('n,fc',5,0.4); Hd = butter(H); L2=norm(Hd,'l2',1e-10);
In this example, compute the infinity norm of an FIR polyphase interpolator, which is an mfilt object.
Hm = mfilt.firinterp;
Linf = norm(Hm,'linf');
reorder | scale | scalecheck