mrfit — frequency response fit
sys=mrfit(w,mag,order) [num,den]=mrfit(w,mag,order) sys=mrfit(w,mag,order,weight) [num,den]=mrfit(w,mag,order,weight)
positive real vector of frequencies (Hz)
real vector of frequency responses magnitude (same size as w
)
integer (required order, degree of den
)
positive real vector (default value ones(w)
).
stable polynomials
sys=mrfit(w,mag,order,weight)
returns a bi-stable transfer function
G(s)=sys=num/den
, of of given order
such that
its frequency response magnitude abs(G(w(i)))
matches mag(i)
i.e. abs(freq(num,den,%i*w))
should be
close to mag
.
weight(i)
is the weigth given to w(i)
.