function pseudoinvert,matrix,svcutoff svdc,matrix,S,U,V,/double n=n_elements(S) if n_params() eq 1 then svcutoff=0 for i=0,n-1 do if abs(S[i]) lt abs(svcutoff*S[0]) then S[i]=0 return,V##invert(diag(S))##transpose(U) end