~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/robust/hankelsv.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function [nk,W]=hankelsv(sl,tol)
 
2
//!
 
3
// Copyright INRIA
 
4
sl1=sl(1);
 
5
if sl1(1)<>'lss' then error('State-space only :use tf2ss'),end
 
6
if sl(7)=='d' then error('Continuous time only'),end
 
7
sl(7)='c'
 
8
//
 
9
[lhs,rhs]=argn(0),
 
10
if rhs==1 then tol=1000*%eps,end,
 
11
lf=spec(sl(2)),
 
12
if mini(abs(lf))<=tol then
 
13
     error('Imaginary-axis poles!')
 
14
end
 
15
if maxi(real(lf)) > tol then warning('unstable !'),end,
 
16
[sla,sls,d]=dtsi(sl);
 
17
lc=ctr_gram(sls),lo=obs_gram(sls),W=lc*lo;
 
18
nk=sort(real(spec(W)));
 
19
 
 
20
 
 
21