how can i produce svd inverse?

조회 수: 8 (최근 30일)
nadia
nadia 2016년 2월 12일
댓글: John D'Errico 2016년 2월 13일
Hi,I want to use SVD function in matlab and make some changes on S matrix of svd then I want to reproduce the first matrix. how can I do it?for example we use idct2 after using dct2 is there any function like this for svd inverse or we should multiply U*S*V'?

답변 (1개)

John D'Errico
John D'Errico 2016년 2월 12일
The definition of the svd is it factors your matrix A into the factors:
A = U*S*V'
There is no "inverse" function needed. Is a matrix multiply that hard to do? If it makes you happy...
svdinverse = @(U,S,V) U*S*V';
  댓글 수: 2
nadia
nadia 2016년 2월 13일
yes I know this but when I multiply them the result is floating and different from first matrix(suppose I don't make any changes on these component) so I used round function on U*S*V' but it make some problem latter.
John D'Errico
John D'Errico 2016년 2월 13일
Any inverse you would ever find would have EXACTLY the same issue. Surely you do not think that tools like ifft can guarantee an EXACT inverse?
Welcome to the wacky, wonderful, world of floating point arithmetic. Learn what happens when you do virtually any operations with real numbers. There will ALWAYS be subtle errors in the least significant bits due to floating point arithmetic in any computation like this.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by