Advertisement
Guest User

Untitled

a guest
May 28th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.36 KB | None | 0 0
  1. function testSVD()
  2.  
  3.   A = rand(10,5);
  4.   [u,s,v]=svd(A,'econ');
  5.  
  6.   novDokument=rand(15,1);
  7.  
  8.   novA=[A;zeros(5,5)];
  9.   novA=[novA,novDokument];  
  10.  
  11.   rekDokum=inv(s)*u'*novDokument(1:10,1);
  12.   mojV=[v;rekDokum'];
  13.  
  14.   rekBesed=novA(11:15,:)*mojV*inv(s);
  15.   mojU=[u;rekBesed];
  16.  
  17.   [u1,s1,v1]=svd(novA,'econ');
  18.   u1
  19.   mojU
  20.  
  21.   v
  22.   mojV
  23. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement