array chicanery [message #28053] |
Thu, 15 November 2001 16:11 |
nrh
Messages: 19 Registered: September 2000
|
Junior Member |
|
|
I've experienced some wierd business with arrays, and I'm hoping somebody can explain.
I have been using the IDL function PCOMP, calculating the pricipal components of some data.
If I feed in a float array to the function,
eg.
result=PCOMP(data,coefficients=eigenvectors,eigenvalues=eige nvalues,/covariance,/standardize)
I get a result, but when I redisplay the data array, it has changed. Since PCOMP only returns
a result, what is it doing to my original array, and why? There are no common variables, as far
as I know, so the original data should not change. I apologise in advance if this is blindingly
obvious, and of course, I can just make a copy of the original data into another variable to use
later, I am just curious as to what is going on.
Any thoughts?
Cheers
--
"For every complex problem, there is a solution that is simple, neat, and wrong."-H. L Mencken (1880-1956)
Rochelle Hatton
|
|
|