a=.5 ?...@$ 4
b=.5 4 ?...@$ 20
FWIW: Grouping in this case can be done like:
a (]</.~ (| {.)"_1) b
+-----------+----------+-----------+
| 6 15 19 12|14 19 0 17|13 18 11 12|
| 0 14 6 18| | |
|18 0 10 2| | |
+-----------+----------+-----------+
Hallo Brian Schott, je schreef op 02-02-10 06:43:
> To clarify my question further, the operators used
> in my verb e are completely fictitious. For example |&{. in
> the following line bears no relation to my problem and the
> resulting calculations in each select case is fictional,
> too.
>
> z=. x|&{.b
>
> I am thinking that some of the possible aspects to
> the solution could be monadic = , key /. , and agenda @. ,
> but I can't put them together. There may be even be an apply
> 128!:2 .
>
> So how do I group the similar y data values so that
> I can operate the same way within the groups, but
> differently on different groups, when I don't know how to
> construct the group until I have examined each group's y
> value's relation to its x value, first?
>
> And in my real case, both the x and y value of each
> group is used in the case calculation, not just the y value,
> as my example might suggest. That is, the case calculation
> is dyadic, not monadic.
>
> Thanks, in advance,
>
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
--
Met vriendelijke groet,
=@@i
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm