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

Home » Public Forums » archive » Re: null array
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: null array [message #36472 is a reply to message #36471] Wed, 24 September 2003 17:47 Go to previous messageGo to previous message
tomson is currently offline  tomson
Messages: 39
Registered: March 2003
Member
Thanks everybody.

I think this method
if n_elements(array) eq 0 then array=scalar else array=[array,scalar]
is quit good if I donot define array.

But What I want to do is to initialize several arrays which are in common
block and their length will be changed for different call and the lengths
of them may be zero. If the lengthes of them are zero, the process will be
changed. If there isnot any initialization, the array return to the main
program may be the former ones.

Best
Tomson

"Reimar Bauer" <R.Bauer@fz-juelich.de> ????
news:bkr2ls$cjvi$1@zam602.zam.kfa-juelich.de...
> Tomson wrote:
>
>> Hi, I need a null array without any elements in it. Then elements will
be
>> added to it. But how to define a null array?
>>
>> Best
>> Tomsom
>
> What is this? I don't use matlab.
>
> Would you like to do something like this.
>
> if n_elements(array) eq 0 then array=scalar else array=[array,scalar]
>
> Or in a loop
>
> for i=0,10 do begin
> ..
>
> if i eq 0 then array=scalar else array=[array,scalar]
> endfor
>
> Reimar
>
>
> --
> Forschungszentrum Juelich
> email: R.Bauer@fz-juelich.de
> http://www.fz-juelich.de/icg/icg-i/
> ============================================================ ======
> a IDL library at ForschungsZentrum Juelich
> http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to read the data like this?
Next Topic: Programming ENVI

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

Current Time: Thu Oct 09 20:10:39 PDT 2025

Total time taken to generate the page: 0.00357 seconds