summaryrefslogtreecommitdiff
path: root/2048/DEPENDENCIES/transp.sci
blob: 39854c9cee0d28a8a5eada81202236f6993be3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// function [P,degP] = transp(Q,degQ)
// MATLAB FUNCTION transp TO TRANSPOSE
// A POLYNOMIAL MATRIX

// H. Kwakernaak, July, 1990

function [P,degP] = transp(Q,degQ)

[rQ,cQ] = polsize(Q,degQ);

rP = cQ; cP = rQ; degP = degQ;
P = zeros(rP,(degP+1)*cP);
for i = 1:degP+1
    P(:,(i-1)*cP+1:i*cP) = Q(:,(i-1)*cQ+1:i*cQ)';
end

endfunction;