~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to macros/auto/tf2ss.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
   else
25
25
        pp=den(k);nk=num(k);
26
26
   end;
 
27
   
27
28
   slk=cont_frm(nk,pp);//
28
29
   [ak,bk,ck,dk1]=slk(2:5);
29
30
   // [s sk]
43
44
  
44
45
  nrmb=norm(b,1);nrmc=norm(c,1);fact=sqrt(nrmc*nrmb);
45
46
  b=b*fact/nrmb;c=c*fact/nrmc;
46
 
  [a,u]=balanc(a);c=c*u;b=u\b; 
 
47
  [a,u]=balanc(a);c=c*u;b=u^(-1)*b; 
47
48
 
48
49
  if rhs<2 then 
49
50
    [no,u]=contr(a',c');
52
53
  end
53
54
  u=u(:,1:no);
54
55
  a=u'*a*u;b=u'*b;c=c*u;
55
 
  [a,u]=balanc(a);c=c*u;b=u\b; 
 
56
  [a,u]=balanc(a);c=c*u;b=u^(-1)*b; 
56
57
  sl=syslin(h('dt'),a,b,c,d);
57
58
else
58
59
  sl=syslin(h('dt'),[],[],[],d)
59
60
end
 
61
endfunction