Instantly share code, notes, and snippets.

# mattdsp

• Sort options
Last active Jan 2, 2018
Least squares FIR digital filter design with prescribed magnitude AND phase response using Levinson's algorithm
View levin.m
 function x = levin(a,b) % function x = levin(a,b) % solves system of complex linear equations toeplitz(a)*x=b % using Levinson's algorithm % a ... first row of positive definite Hermitian Toeplitz matrix % b ... right hand side vector % % Author: Mathias C. Lang, Vienna University of Technology, AUSTRIA % 1997-09 % mattsdspblog@gmail.com
Last active Jan 2, 2018
Complex FIR digital filter design using a complex least squares criterion (complex filter coefficients, possibly non-linear phase)
View cfirls.m
 function h = cfirls(N,f,d,w) % function h = cfirls(N,f,d,w) % complex FIR filter design using a least squares criterion % the desired response doesn't need to have a linear phase % % h complex-valued impulse response % N desired filter length % f frequency grid -1 <= f <= 1 ( '1' corresponds to Nyquist) % d desired complex-valued frequency response on the grid f % w (positive) weighting function on the grid f
Last active Jan 2, 2018
Equation error method for digital IIR filter design; optional iterative solution of exact least squares filter design problem
View eqnerror.m
 function [a,b] = eqnerror(M,N,w,D,W,iter); % [a,b] = eqnerror(M,N,w,D,W,iter); % % IIR filter design using equation error method % % if the input argument 'iter' is specified and if iter > 1, then % the equation error method is applied iteratively trying to % determine the true L2 solution of the nonlinear IIR design problem % % M numerator order
You can’t perform that action at this time.