function ps32_6242_2004(n,m) % function ps32_6242_2004(n,m) % % solves Problem 3.2a by generating a random all-pass % stable transfer function G of order n+2m (n real poles, 2n complex poles) % and finding its Hankel singular values % % uses hsvd_6242.m if nargin<1, n=5; end if nargin<2, m=5; end p=rand(n); % -p are real poles a=rand(m); % -a are real parts of complex poles b=rand(m); % b are imaginary parts of complex poles s=tf('s'); G=1; for k=1:n, G=G*((s-p(k))/(s+p(k))); end for k=1:m, G=G*((s^2-2*a(k)*s+a(k)^2+b(k)^2)/(s^2+2*a(k)*s+a(k)^2+b(k)^2)); end hsvd_6242(G)