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

Home » Public Forums » archive » Re: Writing an efficient array operation in IDL
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: Writing an efficient array operation in IDL [message #74823] Thu, 03 February 2011 05:45 Go to previous message
Axel Martínez is currently offline  Axel Martínez
Messages: 22
Registered: June 2010
Junior Member
On Feb 3, 2:14 am, Rony K Varghese <ronykvargh...@gmail.com> wrote:
> Dear ALL,
>
> Suppose, I have to create an output array B filled with value 8 as
> follows, from the input 5x5 array A.
>
> A  = 0 0 4 0 0
>        0 4 0 4 0
>        4 0 0 0 4
>        0 4 0 4 0
>        0 0 4 0 0
>
> B =  0 0 8 0 0
>        0 8 8 8 0
>        8 8 8 8 8
>        0 8 8 8 0
>        0 0 8 0 0
>
> The logic is to fill the whole region bounded by value 4 in the input
> array, with the value 8 in the output array.
> How i can do this efficiently in IDL, like using array operations?
> I need to apply for a large sized array.
> Thanks in advance..
>
> - Rony

Hi,

Check the IDL function LABEL_REGION, this should do it.
[Message index]
 
Read Message
Read Message
Previous Topic: Library/Functions to write configuration file for application
Next Topic: IDL 8 image function

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

Current Time: Wed Oct 08 15:38:02 PDT 2025

Total time taken to generate the page: 0.00426 seconds