% Mat-1.3379 Dynaamisten systeemien erikoiskurssi Eirola/Hannukainen
%
% compute the right inverse of AI with QR-dec.
%
% 


function AIx = pifun(A,x)

% NOTE : in reaworld computing the inverse is a bad idea.
%        only opearation to vector i.e. AI*x wich can be done
%        without explicitely construction the inverse.


AIx = pinv(A)*x;

