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

Home » Public Forums » archive » array referencing problem ...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
array referencing problem ... [message #42954] Tue, 08 March 2005 08:43 Go to previous message
Andreas Brunn is currently offline  Andreas Brunn
Messages: 3
Registered: April 2003
Junior Member
dear listland
I have a problem referencing a three dimensional array with a two
dimensional mask. One solution I�m well aware of is building a two
dimensional array and copy this in each channel of the three dimensional.
But there must be a more elegant and memory saving method doing this, so i
tried the following and ran in an in my eyes a little bit strange behaviour:

ENVI> a=findgen(5,5,5)
ENVI> ma=where(a le 10)
ENVI> print, (a(*,*,1))(ma)
25.0000 26.0000 27.0000 28.0000 29.0000 30.0000 31.0000 32.0000 33.0000
34.0000 35.0000
thats what I hoped and expected as a result

but if I try the following:
ENVI> (a(*,*,1))(ma) = 2
% Expression must be named variable in this context: <FLOAT Array[5, 5]>.
% Execution halted at: $MAIN$

I only get that error message, where is my mistake ?

Is there a way applying this mask on each of the channels without copying
each channel in a two dimensional array ?

thanx a lot in advance

Andi
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: calling c from idl
Next Topic: Extract an image

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

Current Time: Wed Oct 08 15:53:59 PDT 2025

Total time taken to generate the page: 0.00400 seconds