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

Home » Public Forums » archive » Structures and arrays of structures
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: Structures and arrays of structures [message #93821 is a reply to message #93820] Fri, 28 October 2016 05:59 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
To create an array of structures, use the replicate function:

IDL> struct = {a: 0.0, b: 0.0}
IDL> struct_arr = replicate(struct, 100)
IDL>
IDL>
IDL> help, struct_arr
STRUCT_ARR STRUCT = -> <Anonymous> Array[100]
IDL>
IDL> help, struct_arr[0]
** Structure <11a1608>, 2 tags, length=8, data length=8, refs=3:
A FLOAT 0.00000
B FLOAT 0.00000
IDL> help, struct_arr.a
<Expression> FLOAT = Array[100]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Smoothing Spline -- any existing efficient routines?
Next Topic: Technique to find maximum in 100x100 element moving box

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

Current Time: Wed Oct 08 16:02:12 PDT 2025

Total time taken to generate the page: 0.00360 seconds