I am developing an image processing application for detecting objects.
At some point, I use the log of a generalized eigenvalue vector of two square covariance matrices. Suppose I have a 9x9 a covariance matrix.
a = rand(9, 9)%just generating random matrix for testing problem easily b = eig(a, a)%generalized eigenvalues vector containing nine values equal to 1 %so we have b = [1.000, 1.000, 1.000 ... (9 times)] c = log(b(:)) %we know b contains values of 1. and log(1) is 0.
Although we know and can debug it to see that b contains elements with a value of 1 and log (1) is 0, the contents of c:
1.0e-014 * 0.0222 0.1110 0.0222 0.0222 -0.0777 0 0.0222 0.0888 0
This is in my case. Does anyone know why it doesn't matter 0? Thanks.
source share