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 > N_ELEMENTS gt 0
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 5431 of 6247
Post > Topic >>

N_ELEMENTS gt 0

by chloesharrocks@[EMAIL PROTECTED] Feb 14, 2008 at 01:37 AM

Is it possible to combine the N_ELEMENTS function with the greater
than operator?  I just want to search through an array and find out
how many elements exist which are greater than zero (I don't need to
know where they are, just how many), but I can't get it to work.  I
have an array called good_index which I happen to know has 6 values >
zero, but when I run the following code, it tells me I only have 1
value > zero:

number =3D (N_ELEMENTS(good_index) gt 0)
print, number

Is there a way to do this without using a where function?
Thanks
Chlo=E9
 




 3 Posts in Topic:
N_ELEMENTS gt 0
chloesharrocks@[EMAIL PRO  2008-02-14 01:37:33 
Re: N_ELEMENTS gt 0
Maarten <maarten.sneep  2008-02-14 02:00:12 
Re: N_ELEMENTS gt 0
Jean H <jghasban@[EMAI  2008-02-14 11:12:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Oct 10 13:25:48 CDT 2008.