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

Home » Public Forums » archive » Subset of a structure?
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: Subset of a structure? [message #87247 is a reply to message #87246] Mon, 20 January 2014 14:59 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Hi Troy-

You need to be careful between an array of structures and a structure of arrays. Here's what I gather from your example:

1) pm25_total is a scalar structure (N_ELEMENTS(pm25total) =1)
2) pm25_total.reports_good is an array of structures. There are 144 elements in this array. Each element is a structure and has 4 tags. Each tag is a scalar.

So, we have

A) pm25_total.reports_good is a 144 element array of structures
B) pm25_total.reports_good[0], pm25_total.reports_good[1], etc is a structure, and pm25_total.reports_good[0].time_js_good is a scalar (as is pm25_total.reports_good[1].time_js_good, etc)

C) pm25_total.reports_good.time_js_good[1] is non-sensical. time_js_good (the tag) is not an array, but a scalar. You want to index the array, which in this case is pm25_total.reports_good.

TL;DNR: PM25_TOTAL.reports_GOOD[good_val_pm25].time_JS_GOOD should work.

(Notice the use of square brackets for indexing an array.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: averaging w.r.t time resolution
Next Topic: Box and Whisker Plotting

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

Current Time: Fri Oct 10 06:11:46 PDT 2025

Total time taken to generate the page: 0.87107 seconds