📄 r2pq.m
字号:
% R2PQ - From kernel to LMF representation.%% [P,Q] = pq2ss(R)%% R - 3d array of parameter of a kernel representation% ( R0 = R(:,:,1), ... ,Rl = R(:,:,l+1) )% P,Q - 3d array of parameters of an LMF representation% ( the same format as R )%% Note 1: the input/output partition is fixed-first % M variables inputs, the rest outputs.%% Note 2: requires the Polynomial Toolbox Version 1.5function [P,Q] = pq2ss(R)% Constants[g,dw,l1] = size(R);l = l1 - 1;% Find a minimal kernel representation (R row reduced)addpath ../polyx% Unfold R in a 2d matrix [R0 R1 ... Rl]R = reshape(R,g,(l1)*dw);% Call polyx for the row reductionR = ppck(R,l);R = prowred(R,'z');% Cancel zero rowsp = prank(R);R = psel(R,1:p,':');R = punpck(R);% Transform R back to a 3d arrayR = reshape(R,p,dw,l1);% Partition Rm = dw - p;Q = R(:,1:m,:);P = -R(:,m+1:end,:);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -