my array is too long for PCOMP?! [message #38764] |
Thu, 25 March 2004 03:01  |
Thomas Nehls
Messages: 24 Registered: March 2004
|
Junior Member |
|
|
Hi,
I want to compute the principal components of an array with 3 colums and
around 56000 rows. All I get is "% Array has too many elements."
I am sure there is a very easy solution for this problem, there must be
a keyword or something... I tried [,/DOUBLE] but its not working.
?
Thanks in advance
Tom
|
|
|
Re: my array is too long for PCOMP?! [message #38808 is a reply to message #38764] |
Thu, 25 March 2004 07:07  |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
Thomas Nehls wrote:
>
> Hi,
>
> I want to compute the principal components of an array with 3 colums and
> around 56000 rows. All I get is "% Array has too many elements."
I tried the following:
seed = 12345L
data = randomn(seed,3,56000)
result = pcomp(data,coefficients=coef,eigenvalues=eigen)
There were no such problems. Are you sure you've got 3 columns and 56000
rows? If it's the other way around, pcomp() has lots of problems, since
it needs to create a 56000x56000 array internally. In IDL, like Fortran,
the number of columns is the length of the first dimension, unlike C,
where it's the last dimension. As a result, this is an easy mistake for
C programmers to make.
|
|
|