Posted Thursday, February 10, 2005 4:18 PM
|
|
|
|
Hi,
strange things happened. Why is this code failing? Should be piece of case (basic math)...
It seem that after calculation of eigenvalues, matrix d1 gets corrupted or something
> a_m_centered.CorrelationMatrix.Eigen e1, , d1
> Debug.Print d1(1, 1) ^ -0.5 'Invalid procedure call or argument
Here is the matrix
>? d1.GetString
>| -0.539 -0.281 0.296 0.736 0.000 |
>| -0.327 -0.574 0.414 -0.626 0.000 |
>| -0.523 0.431 -0.090 -0.182 0.707 |
>| 0.523 -0.431 0.090 0.182 0.707 |
>| 0.237 0.468 0.851 0.010 0.000 |
|
|
Posted Thursday, February 10, 2005 4:33 PM
|
|
|
|
Hi
I don't find it strange at all.
You are trying to find the square root of a negative number; (-0.574) ^ - 0.5 is in the same as 1/Sqrt(-0.574) which raises the same error in visual basic.
Trifon Triantafillidis | Lead Developer |
|
|
|
Posted Thursday, February 10, 2005 4:42 PM
|
|
|
|
Hi Trifon,
of course... i'm in shame. Stupid question, sorry about that.
This is why one should allways think before sending messages :-)
and thanx for quick answer.
BR.-Tero-
|
|
Posted Thursday, February 10, 2005 4:59 PM
|
|
|
|
It is ok TeOI .. don't worry and do post messages ! :-)
Trifon Triantafillidis | Lead Developer |
|
|
|
|
|