O=: 3 5 [EMAIL PROTECTED] 7
F=: 11 7 5 [EMAIL PROTECTED] 1000
$ O {"2 F
11 3 5 5
$ (<_2 _1) |: O {"2 F
11 3 5
----- Original Message -----
From: "Brouwer, Roelof <[EMAIL PROTECTED]>" <[EMAIL PROTECTED]>
Date: Friday, November 10, 2006 2:26 am
Subject: RE: [Jgeneral] selection expression in J
> The following would work if the first axis of X and F was not
> there. But
> even in the 2 axis case there might be a more elegant expression
> withouthaving to do so many tranposes
> X=.|:(|:O){"1 |:F
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of Henry Rich
> Sent: November 10, 2006 12:12 PM
> To: 'General forum'
> Subject: RE: [Jgeneral] selection expression in J
>
> x =: ((<s,((<p,a){O),a) { F) (<s,p,a)} x
>
> is a direct translation of what you wrote. Is that
> what you want?
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [EMAIL PROTECTED] On Behalf Of Brouwer,
> > Roelof <[EMAIL PROTECTED]>
> > Sent: Friday, November 10, 2006 4:27 AM
> > To: General forum
> > Subject: [Jgeneral] selection expression in J
> >
> > If I want
> >
> >
> >
> > X(s,p,a)<- F(s,O(p,a),a) s=0..ns-1 p=0..np-1 a=0..na-1
> > O is np
> > by na and O 's components have values 0..nv-1 ; F is ns
> > by nv by na
> > ; and X is ns by np by na
> >
> >
> >
> > What is an elegant J expression that will do the trick
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm