Code covered by the BSD License  

Highlights from
TP Tool

from TP Tool by P. Baranyi, Z. Petres, Sz. Nagy
MATLAB Toolbox providing the functions for TP Model Transformation based Control Design

ino(U)
function [ip,cs] = ino(U)
% INO - mtrix felbonts az INO felttel szerint
%
% [IP,BASE]=INO(U)
% 
% Az U mtrix nxr-es, n>r s SN, azaz a sorok sszege
% 1 kell legyen;
% 
% A kimenet az nxr-es IP s az rxr-es BASE mtrix, ahol
% a BASE SN, az IP pedig SN, NN(nemnegatv elemu) 
% s INO(minden oszlop legkisebb eleme 0
% 
% s amelyekre U=IP*BASE

%U=[.5 .1 .2 .2;.1 .1 .1 .7;.2 0 .4 .4; .2 .8 0 0;.3 .3 .2 .2];
[n r] = size(U);
UU = U;
U(:,r) = 0;

egy = min(U);  % a burkolszimplex lapjainak egyenlete/1
egy(r) = max(sum(U,2));
cs = ones(r,1)*egy(1:r-1); % a burkolszimplex cscsai/1
for a = 1:r-1
    cs(a,a) = 2*egy(r) + egy(a) - sum(egy); % a burkolszimplexcsucsai/2
end
cs(:,r) = 1 - sum(cs,2); %az r. dimenzi
%for a=1:r
%    RNO(a,:)=sum(cs)-(r-1)*cs(a,:);% avgleges szimplex cscsai
%end

%ip=UU*inv(RNO); %az interpolcis mtrix
ip = UU*inv(cs);  %az interpolcis mtrix

Contact us at files@mathworks.com