Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function AK = svdapprox(A,k)
  2. tol=0.001
  3. r=rank(A,tol)
  4. if k>r % return error message if k exceeds rank of matrix
  5. fprintf('Value of k must not exceed that of r' );
  6. end
  7. [U, S, V]=svd(A) %calculate the svd of a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement