Research Article

Computing the Pseudoinverse of Specific Toeplitz Matrices Using Rank-One Updates

Algorithm 3

function alg41 = alg41(A)
%***************************%
% General Information.%
%***************************%
% Synopsis:
% alg41 = alg41(A)
% Input:
% A = the initial matrix of interest.
% Output:
% alg41 = mp-inverse by using rank-one updates and the Sherman_Morrison formula.
% This function follows Algorithm 1.
% The correct performance of alg41b requires the presence of yltXl function.
Astar = A;
m,n = size(A);
G0 = zeros(m,m);
if m > 1
  for i = 1:m-1
Gkout = G0+A(:,i)*Astar(i,:);
G0 = Gkout;
  end
  Gm = Gkout+A(:,m)*Astar(m,:);
  else
Gm = G0;
end
Gkout = Gm;
Y02 = GkoutA;
X02 = Y02;
for l = m+1:n-1
yltout,Xlout = yltXl(Y02,X02,Astar,l,m,n);
Y02 = yltout;
X02 = Xlout;
end
alg41 = X02 - Astar*Y02(:,n)*Y02(:,n)/(1+Astar(n,:)*Y02(:,n));