Could the requirements be explained again:
how we get from i.10
    0 1 2 3 4 5 6 7 8 9
to
    0 1 2 81 4 25 6 7 8 9
using 3 5 3?

Like this?

   a^1>.+:+/3 5 3=/a=.i.10
0 1 2 81 4 25 6 7 8 9


----- Original Message ----
From: JC Coez <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Friday, November 24, 2006 2:08:48 PM
Subject: [Jprogramming] Index replacement


How could I apply a function f to elements of an array which are selected by 
a given list, those elements could be modified several times.
For example if f is 2^ and v =:  i.10 and ind=: 3 5 3 the result would  be 
0 1 2 81 4 25 6 7 8 9
I don't find any simple solution.
Thanks for any help
Jen Claude Coez 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to