source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/nulleps.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 731 bytes
Line 
1function N = nulleps(M,tol,maxrank)
2% Find the nullspace of M.  This is the regular nullspace, augmented by
3% vectors that aren't really in the nullspace, but have low singular
4% values associated with them.  tol is the threshold on these singular values.
5
6% maxrank indicates the maximum rank that M can be expected to have.  All but the
7% first MAXRANK singular values can be assumed to be due to noise.  Ideally, this
8% should be treated in a unified way with the tolerance, and one should detect
9% whether results seem unstable when the MAXRANK singular value is near to the
10% MAXRANK+1.
11if maxrank == -1
12  maxrank = min(size(M));
13end
14
15[u,s,v] = svd(M);
16sigsvs = min(maxrank, sum(diag(s)>tol));
17N=u(:,sigsvs+1:size(u,2));
Note: See TracBrowser for help on using the repository browser.