[Master Index]
[Index for /tools/hpmatlab/toolbox/signal]
firls
(/tools/hpmatlab/toolbox/signal/firls.m)
Function Synopsis
h=firls(N,F,M,W,ftype);
Help text
FIRLS Linear-phase FIR filter design using least-squares error minimization
B=FIRLS(N,F,M) returns a length N+1 linear phase (real, symmetric
coefficients) FIR filter which has the best approximation to the
desired frequency response described by F and M in the least squares
sense. F is a vector of frequency band edges in pairs, in ascending
order between 0 and 1. 1 corresponds to the Nyquist frequency or half
the sampling frequency. M is a real vector the same size as F
which specifies the desired magnitude of the frequency response of the
resultant filter B. The desired response is the line connecting the
points (F(k),M(k)) and (F(k+1),M(k+1)) for odd k; FIRLS treats the
bands between F(k+1) and F(k+2) for odd k as "transition bands" or
"don't care" regions. Thus the desired magnitude is piecewise linear
with transition bands. The integrated squared error is minimized.
B=FIRLS(N,F,M,W) uses the weights in W to weight the error. W has one
entry per band (so it is half the length of F and M) which tells
FIRLS how much emphasis to put on minimizing the integral squared error
in each band relative to the other bands.
B=FIRLS(N,F,M,'Hilbert') and B=FIRLS(N,F,M,W,'Hilbert') design filters
that have odd symmetry, that is, B(k) = -B(N+2-k) for k = 1, ..., N+1.
A special case is a Hilbert transformer which has an approx. magnitude
of 1 across the entire band, e.g. B=FIRLS(30,[.1 .9],[1 1],'Hilbert').
B=FIRLS(N,F,M,'differentiator') and B=FIRLS(N,F,M,W,'differentiator')
also design filters with odd symmetry, but with a special weighting
scheme for non-zero magnitude bands. The weight is assumed to be equal
to the inverse of frequency, squared, times the weight W. Thus the
filter has a much better fit at low frequency than at high frequency.
This designs FIR differentiators.
See also REMEZ, FIR1, FIR2, FREQZ and FILTER.
Cross-Reference Information
This function calls
- abs /tools/hpmatlab/toolbox/matlab/elfun/abs.m
- any /tools/hpmatlab/toolbox/matlab/ops/any.m
- cos /tools/hpmatlab/toolbox/matlab/elfun/cos.m
- diff /tools/hpmatlab/toolbox/matlab/datafun/diff.m
- else /tools/hpmatlab/toolbox/matlab/lang/else.m
- elseif /tools/hpmatlab/toolbox/matlab/lang/elseif.m
- end /tools/hpmatlab/toolbox/matlab/lang/end.m
- error /tools/hpmatlab/toolbox/matlab/lang/error.m
- flipud /tools/hpmatlab/toolbox/matlab/elmat/flipud.m
- for /tools/hpmatlab/toolbox/matlab/lang/for.m
- hilbert /tools/hpmatlab/toolbox/signal/hilbert.m
- i /tools/hpmatlab/toolbox/matlab/elmat/i.m
- if /tools/hpmatlab/toolbox/matlab/lang/if.m
- isempty /tools/hpmatlab/toolbox/matlab/ops/isempty.m
- length /tools/hpmatlab/toolbox/matlab/general/length.m
- max /tools/hpmatlab/toolbox/matlab/datafun/max.m
- min /tools/hpmatlab/toolbox/matlab/datafun/min.m
- nargchk /tools/hpmatlab/toolbox/matlab/lang/nargchk.m
- nargin /tools/hpmatlab/toolbox/matlab/elmat/nargin.m
- ones /tools/hpmatlab/toolbox/matlab/elmat/ones.m
- pi /tools/hpmatlab/toolbox/matlab/elmat/pi.m
- rem /tools/hpmatlab/toolbox/matlab/elfun/rem.m
- sin /tools/hpmatlab/toolbox/matlab/elfun/sin.m
- sinc /tools/hpmatlab/toolbox/signal/sinc.m
- sineint /tools/hpmatlab/toolbox/signal/sineint.m
- size /tools/hpmatlab/toolbox/matlab/general/size.m
- sqrt /tools/hpmatlab/toolbox/matlab/elfun/sqrt.m
- zeros /tools/hpmatlab/toolbox/matlab/elmat/zeros.m
This function is called by
- filtdemo /tools/hpmatlab/toolbox/signal/filtdemo.m
- intfilt /tools/hpmatlab/toolbox/signal/intfilt.m
Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON