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
Re: help with WHERE( ) function [message #91787 is a reply to message #91786] Wed, 26 August 2015 09:42 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 08/26/15 12:14, g.nacarts@gmail.com wrote:
> 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?

Maybe you should change the "and" to "or" in your chained-together
WHERE() call?

cheers,

paulv
[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 17:43:53 PDT 2025

Total time taken to generate the page: 0.00555 seconds