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

Home » Public Forums » archive » Re: How to set elements of arrays as blank (not zero)?
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
Re: How to set elements of arrays as blank (not zero)? [message #38850] Wed, 31 March 2004 09:03
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Mathias Brandt wrote:
> Hello everyone!
> After great achievements following a hint from this newsgroup concerning
> array storage in files I am afraid I must bother you with another question:
> How can I set an element of a floating-point array as blank, so that it does
> not appear as 0 (zero) when importing the file (containing the array) into a
> spreadsheet calculation program?
>
> Thank you very much for a good advice.
>
> Mathias
>
>


Dear Matthias,

did you know the idea of missing_values or/and fill_values?

It is better to use a value outside the range of your data. Some people
prefer NaN. !values.f_nan in idl.

Reimar





--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
Re: How to set elements of arrays as blank (not zero)? [message #38856 is a reply to message #38850] Wed, 31 March 2004 03:02 Go to previous message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Mathias Brandt wrote:
> Hello everyone!
> After great achievements following a hint from this newsgroup concerning
> array storage in files I am afraid I must bother you with another question:
> How can I set an element of a floating-point array as blank, so that it does
> not appear as 0 (zero) when importing the file (containing the array) into a
> spreadsheet calculation program?

How about creating a string array - and then using where to set the
elements you wish to be blank to ''.... something like

output=string(input)
output[where(input lt 0.00001)]=''

then write output to a file.

Ben

PS: Where 0.00001 is whatever the criterea for you floating point number
actually being zero is (thanks David!)

--
Ben Panter, Edinburgh
My name (no spaces)@bigfoot which is a com.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: changing button text for dialog_message
Next Topic: Re: using TVRD(true=0) with a 24-bit image and decomposed=0

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

Current Time: Wed Oct 08 15:49:44 PDT 2025

Total time taken to generate the page: 0.00413 seconds