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 #91800 is a reply to message #91795] Sat, 29 August 2015 07:50 Go to previous message
karo03de is currently offline  karo03de
Messages: 21
Registered: March 2007
Junior Member
Am Donnerstag, 27. August 2015 15:44:10 UTC+2 schrieb Yngvar Larsen:
> On Thursday, 27 August 2015 14:56:55 UTC+2, g.na...@gmail.com wrote:
>> What you said it makes sense. Thanks Phillip, I didn't realize that this was happening.
>>
>> I want the indices where are not zero. So I cannot just sum up the counts.
>
> Which indices should not be zero? You have 4 different masks.
>
> x = mask1 ne 0
> y = mask2 ne 0
> z = mask3 ne 0
> w = mask4 ne 0
>
> Some possibilities:
> *) All masks are 1 -> where(x AND y AND z AND w) ;apparently, you have no such pixels
> *) At least one mask is 1 -> where(x OR y OR z OR w)
> *) At least two masks are 1 -> where((x + y + z + w) ge 2)
> *) Something else?
>
> Which one do you want?
>
> --
> Yngvar

I would recommend for "Something else?"

ind=[where((mask=[[[mask1]],[[mask2]],[[mask3]],[[mask4]]]) ne 0,count)]

Hopefully each nonzero element will be found now! And the index list is useful for mask!

Karsten
[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:47:17 PDT 2025

Total time taken to generate the page: 0.00445 seconds