Maybe not elegant, but interesting.
]A=:i.4 2
]A=:i.4 2
0 1
2 3
4 5
6 7
f=: 13 :'(}."1 y)g }:"1 y'
f
}."1 g }:"1
g=:%
g f A
0
0.666667
0.8
0.857143
g=: o.
g f A
0
_6.86451
85.7338
3.14155
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of alexgian
Sent: Wednesday, April 30, 2014 5:50 AM
To: J Programming forum
Subject: [Jprogramming] Applying a dyad to exusting matrix data
Suppose I have an Nx2 data matrix, say
x1 y1
x2 y2
x3 y3
....
and a dyadic verb called, say, df1
Is there an elegant way to get the result matrix
x1 df1 y1
x2 df1 y2
x3 df1 y3
.....
without resorting to "from - {" and "take - {." jiggery-pokery
Or perhaps just a means to convert an expresiion from the
df1 x1 y1 form, to
x1 df1 y1
All suggestions gratefully received.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm