Hi Gian,

in J, use "copy": dyad #
  (1+0j1*2 1 0)#1 2 3
1 0 0 2 0 3
Spaces or 0 are appended by using complex numbers.
  (1+0j1*2 1 0)#'abc'
 a  b c
See also the fit conjunction (!.) in case you want to replace 0 or space.

Cheers---Christoph


On Mon, Aug 15, 2011 at 2:08 PM, Gian Medri <[email protected]> wrote:

> Hi!
>
> To expand a vector APL has a primitive "\" to do expansion.
> b=: 1 0 0 1 0 1
> b\1 2 3
> 1 0 0 2 0 3
> b\'abc'
> a  b c
> I didn't find any primitive in J to do this. How can J solve this problem?
>
> Thanks in advance
>
> Gian Medri
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to