1
function [nk,W]=hankelsv(sl,tol)
5
if sl1(1)<>'lss' then error('State-space only :use tf2ss'),end
6
if sl(7)=='d' then error('Continuous time only'),end
10
if rhs==1 then tol=1000*%eps,end,
12
if mini(abs(lf))<=tol then
13
error('Imaginary-axis poles!')
15
if maxi(real(lf)) > tol then warning('unstable !'),end,
17
lc=ctr_gram(sls),lo=obs_gram(sls),W=lc*lo;
18
nk=sort(real(spec(W)));