There's nothing wrong with that approach.

But probably the most direct is (y+x*i=i.#y), and unless y is very
long, this should be efficient.

-- 
Raul

On Sun, Oct 25, 2020 at 3:58 AM pietdion <[email protected]> wrote:
>
> What is the best way to add, say,  scalar x to component i of vector y?
>
> One way is (x + i{y) i} y
> But this seems clumsy/expensive.
> Is there a cleaner/more efficient way?
> ----------------------------------------------------------------------
> 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