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

Home » Public Forums » archive » Removing unwanted data from 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
Removing unwanted data from a structure [message #84137] Fri, 26 April 2013 09:34 Go to previous message
cab581 is currently offline  cab581
Messages: 7
Registered: April 2013
Junior Member
Hi all,

I tried searching for this, but nothing seemed to match my question, so sorry if this has been asked before.

I have a structure with data from an experiment that contains error values. These are given as (for example, but always less than -100) -999 or -888. I want to keep the structure in tact for analysis, but I'm looking simply to replace these values with NaN. I tried and failed (see below) to use WHERE, but it doesn't work and I'm told that you can't use IF statements with structures.


-----
My thoughts:
I know with an array I can just use

B = WHERE(A LT -100, count)
IF (count GT 0) THEN A[B] = !VALUES.F_NAN

but I think that it is probably inefficient (I have a lot of data) to pull out arrays from my structures, then place them all back in to a new structure to continue my work. Is there any way that I can assign the parts of the structure as scalars for the purpose of an IF statement but replace them back as part of a loop?

Any help is appreciated.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Q: project_vol
Next Topic: MPFIT and bestnorm

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

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

Total time taken to generate the page: 0.00185 seconds