function [A_all] = load_sub_linear_spaces(prefix, postfix, ...
            sView, eView, incrView, imdim, lowdim)

k = 0;
for i=sView:incrView:eView,
  k=k+1;
end;
A_all = zeros([imdim lowdim*k]);
nimages = 0;

for i=sView:incrView:eView,
   fname=[sprintf('%s%d%s',prefix, i,postfix)];
   %disp([sprintf('Loading file  %s', fname)]);
   A = load_matrix(fname)';
   if size(A,1) ~= imdim | size(A,2)~= lowdim,
       msg=[sprintf('The matrix loaded from %s has a dimension (%d,%d) that is not (%d,%d)',fname,size(A,1), size(A,2), imdim, lowdim)];
       disp(msg);
       msg=[sprintf('The matrix is skipped.')];
       disp(msg);
   else 
       nimages = nimages +1;
       A_all(:, ((nimages-1)*lowdim+1):(nimages*lowdim)) = A;
   end
end
msg=[sprintf('%d low dimensional subspaces are loaded with size (%d,%d)', nimages, size(A_all,1),size(A_all,2))];
disp(msg);

return;
