Dear all, I have made a process that makes approxmation of a source matrix.
Every approximated matrix contains error which usually are extreme values (compares to the source). I have noticed that when sme approximation start looking the same then I am getting really close the source image.
That I want to ask you if you know some mathematical ways to measure similaritis in two approximated-matrices. I have used already the corrcoef and it results goosd results but I also want to check other metric.
I wuld like to thank you in advance for your help B.R Alex

 Réponse acceptée

bym
bym le 29 Oct 2011

0 votes

you can try using their eigenvalues:
x = norm(eig(a)-eig(b)); % a & b are your 2 matricies

9 commentaires

Alex
Alex le 29 Oct 2011
very good answer :)
could you please give few more hints why you thought about this method?
bym
bym le 29 Oct 2011
Initially, I was thinking of using SVD which comes up a lot in the literature when approximating a matrix. I just thought the eig method would be easier
Alex
Alex le 31 Oct 2011
One more thing: How I should interpret the results of the
x = norm(eig(X3)-eig(Y3))
the larger the number larger similarity is?
B.R
Alex
Andrei Bobrov
Andrei Bobrov le 31 Oct 2011
conversely
Alex
Alex le 1 Nov 2011
what does it mean?
bym
bym le 2 Nov 2011
it means the lower the value the greater the similarity
Shima Khatiri
Shima Khatiri le 14 Sep 2017
Modifié(e) : Shima Khatiri le 14 Sep 2017
Will it work for a non-square matrix? Because I'm receiving error: For standard eigenproblem EIG(A), A must be square. How can we compare two matrices with different sizes and non-square?
Hi Shima,
It's usually better to start a new post than reviving an old one. I'm not sure of the context for the original post, but I'd typically measure the difference between matrices using
norm(A-B)
which works for non-square matrices, too.
Shanelle Clarke
Shanelle Clarke le 24 Mai 2020
I've found that Christine's answer ( norm(A-B)) works better for me, since MATLAB doesn't always report the eig(A) and eig(B) in the same order.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by