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

Home » Public Forums » archive » Extract Array positions for a set of Values
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Extract Array positions for a set of Values [message #75436] Wed, 09 March 2011 02:48
Paul Magdon is currently offline  Paul Magdon
Messages: 8
Registered: January 2011
Junior Member
Hi,
have a quite simple problem for which I can find a fas solution:

1.) I have an IntArray A (e.g a result from LABEL_REGION)

1 1 1 1 0 0 0
1 1 1 1 0 0 2
0 0 0 0 9 0 2

2.) I have a vector B with Integers (e.g. 1,2,9)

Now I want to extract the positions of B in A and set all values in A which are included in B to let's say 99. How can I do this without a loop?
I tested HISTOGRAM(,REVERSE_INDICES) but as B is not consecutive (e.g 1,2,3,4) I can't find a solution.

Cheers Paul
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to implement periodic boundaries in IMSL_PDE_MOL?
Next Topic: selecting radnom number from 2D array

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

Current Time: Wed Oct 08 15:22:09 PDT 2025

Total time taken to generate the page: 0.00402 seconds