ns =2; [U,S,V] = svd(A,0); #v transposed Vt = V'; #reconstruct the data using a specified number of the most significant datasets recA = U(:,1:ns)*S(1:ns,1:ns)*Vt(1:ns,:)