% Prop8InvMultOpRun: Computation of M^{-1}f according to Prop. 8 
% Run of the function Prop8InvMultf(c,r,TPhi,TG,m,f,e)
% with given input-parameters

%function y= Prop8InvMultfRun;
ltfatstart;


% c=3; % the number c of the frame vectors
% r=2; % the number r of the coordinates of the frame vectors
% TPhi=[4 -2 6; 2 3 5]; %the synthesis matrix (rxc) of the frame Phi
% TG= [3 2 -5; 6 -5 -2]; %the synthesis matrix (rxc) of the frame G (Psi-Phi)
% m=[2 5 3]; %the elements of the positive symbol m (c numbers in a row): 
% e=1/100000; %the aimed error bound

% c=4; % the number c of the frame vectors
% r=3; % the number r of the coordinates of the frame vectors
% TPhi=[4 -2 6 3; 2 3 5 -1; 3 7 2 -9]; %the synthesis matrix (rxc) of the frame Phi
% TG= [3 2 -5 1; 6 -5 -2 -2; 8 -3 4 6]; %the synthesis matrix (rxc) of the frame G (Psi-Phi)
% m=[2 5 3 5]; %the elements of the positive symbol m (c numbers in a row)
% f=[3; 4; 6];  % the coordinates of f (r numbers as columns)
% e=1/100000; %the aimed error bound


c=4; % the number c of the frame vectors
r=3; % the number r of the coordinates of the frame vectors
TPhi=[4 -2 6 3; 2 3 5 -1; 3 7 2 -9]; %the synthesis matrix (rxc) of the frame Phi
TG= [2 1 4 -3; 5 6 -3 2; -1 -3 4 6]; %the synthesis matrix (rxc) of the frame G (Psi-Phi)
m=[2 3 8 7]; %the elements of the positive symbol m (c numbers in a row)
f=[3; 4; 6];  % the coordinates of f (r numbers as columns)
e=1/100000; %the aimed error bound



[TPsi,M1,M2,M1invf,M2invf,n] = Prop8InvMultf(c,r,TPhi,TG,m,f,e);


M1invf % the inverse matrix of M1 via the iterative algorithm in Prop8InvMultOp
%If one wants to compare M1invf to inversion using the inv-function of Matlab
disp('Compare M1invf to the inversion using Matlab:')
%for comparison with Matlab
M1invfMatlab=(inv(M1))*f


M2invf % the inverse matrix of M2 via the iterative algorithm in Prop8InvMultOp
%If one wants to compare M2invf to inversion using the inv-function of Matlab
disp('Compare M2invf to the inversion using Matlab:')
M2invfMatlab=(inv(M2))*f

n


%end