[Jprogramming] Promoting a vector to a matrix (changing rank)

bob therriault bobtherriault at mac.com
Tue Dec 11 17:29:32 UTC 2012


Hi Alex,

I think that the Itemize (,:) primitive is what you are looking for:

r=. i.4
   $ r
4
   $ ,: r
1 4

Also works in higher dimensions

   r=. i.2 3 4
   $ r
2 3 4
   $ ,: r
1 2 3 4

Cheers, bob

On 2012-12-11, at 9:20 AM, Alex Giannakopoulos wrote:

>   v2m =. ] $~ 1,$



More information about the Programming mailing list