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

Home » Public Forums » archive » Re: Someone can help me please?
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: Someone can help me please? [message #77028 is a reply to message #77027] Tue, 26 July 2011 04:02 Go to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Tue, 26 Jul 2011 02:51:25 -0700 (PDT), Giacinto M
<ilgio1984@gmail.com> wrote:

> Hello! I'm a beginner user of IDL,
> I have a little problem that I can't solve, can you help me?:
>
> From a 3D array, I want to look on the 3rd dimension (z) of each
> coordinate (x,y) of the array and count
> the number of time that I can found a specific number:
>
> for example:
> arr=[[[0,1],[2,1]],[[2,2],[1,1]],[[0,1],[0,0]],[[1,1],[1,1]] ] -
>> number 1 appear 3 times on arr(x0,y1)
>
> How can I do this?
> Thanks


print,total(arr eq 1,3,/int)

where "1" is the number you are looking for and "3" the dimension you
are looking at.
[Message index]
 
Read Message
Read Message
Previous Topic: Someone can help me please?
Next Topic: ytickname

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

Current Time: Fri Oct 10 04:11:35 PDT 2025

Total time taken to generate the page: 0.29784 seconds