Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > using the WHERE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 5502 of 6454
Post > Topic >>

using the WHERE function on a ****tion of an array

by becky_s <rda.selin@[EMAIL PROTECTED] > Mar 4, 2008 at 11:23 AM

Dear all,

Please lend me your great expertise to help me solve this problem I
have with the WHERE function.

I have a 3d array of heights, A, and another 3d array of observations
at those heights, B.  I have a third 3d array, C.  I would like
C[0,*,*] to contain values of B only if the corresponding value of A
is between 0 and 1; C[1,*,*] would have values of B only if 1<=A<2,
etc.

I thought this could be done via a WHERE function call, such as:
indices = WHERE(A[0,*,*] ge 4 AND A[0,*,*] lt 5, count)
if count gt 0 then C[4,indices] = B[0,indices]

but this does not work.  Printing A[0,indices], I can see that these
values are not b/w 4 and 5.

On the other hand, if I set each level I am looking at to its own 2d
array, i.e.,
leva = A[0,*,*]
levb = B[0,*,*]
levc = C[4,*,*]
use these values in the same code written above, and add the statement
at the end that C[4,*,*] = levc, then it works just fine.  However, A
and B are actually very large, so this isn't an option.

I'm guessing I do not understand some key part of the WHERE function.
Would someone please ****ne some light on this for me?  Thanks in
advance.
Becky
 




 7 Posts in Topic:
using the WHERE function on a portion of an array
becky_s <rda.selin@[EM  2008-03-04 11:23:56 
Re: using the WHERE function on a portion of an array
greg.addr@[EMAIL PROTECTE  2008-03-04 11:38:26 
Re: using the WHERE function on a portion of an array
greg.addr@[EMAIL PROTECTE  2008-03-04 11:39:51 
Re: using the WHERE function on a portion of an array
Jean H <jghasban@[EMAI  2008-03-04 13:15:49 
Re: using the WHERE function on a portion of an array
becky_s <rda.selin@[EM  2008-03-04 14:17:06 
Re: using the WHERE function on a portion of an array
Jean H <jghasban@[EMAI  2008-03-04 16:20:45 
Re: using the WHERE function on a portion of an array
becky_s <rda.selin@[EM  2008-03-07 09:05:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 14:06:41 CST 2008.