Re: How to set elements of arrays as blank (not zero)? [message #38850] |
Wed, 31 March 2004 09:03 |
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  |
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.
|
|
|