comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » my array is too long for PCOMP?!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
my array is too long for PCOMP?! [message #38764] Thu, 25 March 2004 03:01 Go to next message
Thomas Nehls is currently offline  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 Go to previous message
James Kuyper is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Which widget does ENVI use, when ENVI_SELECT is called? (empty body)
Next Topic: Problems with IDLgrColorbar

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:00:44 PDT 2025

Total time taken to generate the page: 0.00588 seconds