On 6/11/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
Ok, how would I form the cartesian cross-product of these 4 vectors:
age =: i. 2 NB. young, pre-presbyopic, presbyopic
spec =: i. 1 NB. myope, hypermetrope
astig =: i. 1 NB. no, yes
tear =: i. 1 NB. reduced, normal
As stated, I'd get that array using
i.2 1 1 1
But I imagine you really meant
{i.&.>3 2 2 2
which is
0 2 2 2&#:&.>i.3 2 2 2
or
>{i.&.>3 2 2 2
which is
0 2 2 2&#:&>i.3 2 2 2
or possibly
0 2 2 2#.>{i.&.>3 2 2 2
which is
i.3 2 2 2
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm