r2pq.m

来自「A Matlab toolbox for exact linear time-i」· M 代码 · 共 43 行

M
43
字号
% 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 + =
减小字号Ctrl + -
显示快捷键?