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

Home » Public Forums » archive » help with WHERE( ) function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
help with WHERE( ) function [message #91786] Wed, 26 August 2015 09:14 Go to previous message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I have created 4 masks to count the number of elements which are non zero. I used the WHERE function to count the number but it seems that it doesn't count the nonzero elements of the 4 masks.

I typed the following

ind = where((mask1 eq 1) and (mask2 eq 1) and (mask3 eq 1) and (mask4 eq 1),count)
print, count

And I got count 0.

When I typed
ind = where(mask1 eq 1, count)
I got count 908. Which looks that it works for one mask but not for four of them.

Can anyone help with this?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Printf
Next Topic: Icrease a elements in a array

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

Current Time: Wed Oct 08 13:54:33 PDT 2025

Total time taken to generate the page: 0.00481 seconds