function G=ps41a_6242_2004(s) % function G=ps41a_6242_2004(s) % % construct an LTI system with singular numbers s(i) % s(i) must be a column of non-repeated positive numbers s=s(:); % make sure s is a column n=length(s); % system order B=ones(n,1); % the column of ones A=repmat(-1,n,n)./(s*B'+B*s'); % solving analytically for A disp(['Stability margin: ' num2str(max(real(eig(A))))]) G=ss(A,B,B',0); % resulting system