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

« back to all changes in this revision

Viewing changes to macros/calpol/pol2des.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 [N,B,C]=pol2des(Ds)
 
2
// Given the polynomial matrix Ds= D_0 +D_1 s +D_2 s^2 + ... +D_k s^k,
 
3
// pol2des returns three  matrices N,B,C  (with N nilpotent) such that
 
4
// Ds = C (sN-Eye)^-1 B 
 
5
//!
 
6
// Copyright INRIA
 
7
if type(Ds)==1 then Ds=Ds+0*poly(0,'s')*Ds;end
 
8
dg=maxi(degree(Ds))+1;
 
9
[nout,nin]=size(Ds);
 
10
[Sl]=markp2ss(coeff(Ds),dg,nout,nin);
 
11
N=Sl(2);B=-Sl(3);C=Sl(4)