q**>> mf=ginput(50)** % pick 50 points: the first column
of mf is the frequency points and the second column of mf is the corresponding magnitude responses.

•**>>magg=vpck(mf(:2),mf(:,1));** % pack them as a varying
matrix.

•**>> Wa=fitmag(magg);** % choose the order of *W**a* online.
A third-order* W**a* is
sufficient for this example.

•**>> [A,B,C,D]=unpck(W****a** **)** %converting into
state-space.

•**>> [Z,P,K]=ss2zp(A,B,C,D)** % converting into
zero/pole/gain form.