view recoverData.m @ 6:6d94b2bafcd1 default tip

Replace complicated memory-intensive operation with a faster loop
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 06 Dec 2011 11:49:32 -0500 (2011-12-06)
parents 069653867b3b
children
line wrap: on
line source
function X_rec = recoverData(Z, U, K)
  ##RECOVERDATA Recovers an approximation of the original data when using the 
  ##projected data
  ##   X_rec = RECOVERDATA(Z, U, K) recovers an approximation the 
  ##   original data that has been reduced to K dimensions. It returns the
  ##   approximate reconstruction in X_rec.
  ##
  
  X_rec = Z*U(:, 1:K)';

end