summaryrefslogtreecommitdiff
path: root/2048/DEPENDENCIES/l2r.sci
blob: 26e61e0c8a0d065804824b2fb125c94ae6dadb65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// function [Rnum,Rnumdeg,Rden,Rdendeg] = l2r(N,degN,D,degD)
// given Numerator and Denominator polynomial matrices in left form,
// not necessarily coprime, finds right coprime factorisation.

function [Rnum,Rnumdeg,Rden,Rdendeg] = l2r(N,degN,D,degD)

[N,degN] = transp(N,degN);
[D,degD] = transp(D,degD);

[Rnum,Rnumdeg,Rden,Rdendeg] = left_prm(N,degN,D,degD);
[Rnum,Rnumdeg] = transp(Rnum,Rnumdeg);
[Rden,Rdendeg] = transp(Rden,Rdendeg);
endfunction;