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

Home » Public Forums » archive » Re: matrices with different size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: matrices with different size [message #42149] Thu, 13 January 2005 09:52
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <3374f20e.0501130821.41623a00@posting.google.com>,
ikverveelmijdood@hotmail.com (V.S.) wrote:

> Hi,
> my problem is the following: I have a dataset with a strong sinusoidal
> component. However, its period and height are not constant. What I
> exactly want is to split-up the data in different parts, and put them
> into a matrix. Is this possible in IDL (and how?) to generate a
> matrix, filled with vectors that have a different length? I know that
> in Matlab "cell arrays" can be used.
> Best regards,
> Veerle

There are many options. You could:

1) use an array with one dimension equal to the size of the longest
vector that you need. Initialize it with NaNs. This would probably be
easiest to program but potentially inefficient of memory use.

2) use a 1-D array large enough to store all of the values plus a
table of indices, like REVERSE_INDICES does for HISTOGRAM. A little
harder to program but efficient of memory use.

3) use a dynamical data structure like a linked list (using
pointers). I think someone has written a library for making linked
lists.

4) possibly(?) use the sparse-array capabilities of the LAPACK
routines.

Ken Bowman
[Message index]
 
Read Message
Previous Topic: Re: 3-d visualization (itools while in a program)
Next Topic: 3-d visualization (itools while in a program)

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

Current Time: Fri Oct 10 17:55:27 PDT 2025

Total time taken to generate the page: 1.19772 seconds