I want to define a gerund that will promote a rank-1 object (vector) 
to rank-2 using ,: but will leave rank-0 and rank-2 alone. My gerund 
is ]`,:`]. For selection, I'm using $...@$, which gives 1 when presented 
with a vector.

So putting it together, with vec =. 1 2 3 I try

(]`,:`]) @. ($...@$) vec

which is a rank error. On the other hand,  (]`,:`]) @. (1) vec and 
(]`,:`]) @. (,1) vec seem to work, so evidently the problem is with 
my rank-determination part ($...@$), but I can't see what's going wrong. 
Can someone explain it to me? THANKS!!


------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
[email protected]

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

Reply via email to