a*_1^0>:b-+/\a gets close, with a fix-up required
for the element on the boundary.

The result is the negation of the usage in each bin,
but unused bins retain their original values.



----- Original Message -----
From: Raul Miller <[email protected]>
Date: Wednesday, January 27, 2010 8:45
Subject: Re: [Jprogramming] Running Subtraction
To: Programming forum <[email protected]>

> On Wed, Jan 27, 2010 at 10:54 AM, Alex Rufon <alex_ru...@ist-
> systems.com> wrote:
> >   [a=. 2 * 5 + i. 5
> > 10 12 14 16 18
> >   [b=. 35.5
> > 35.5
> ...
> > I want to subtract a from b progressively until b is 0 so from 
> the data above I'll get the following results:
> > _10 _12 _13.5 16 18
> 
> This description does not make sense to me.
> 
> Here are my guesses for where these numbers came from:
> 
> _10  -:  -0{a
> _12  -:  -1{a
> _13.5  -: b - +/0 1{a
> 16  -:  3{a
> 18  -:  4{a
> 
> But I can not figure out how my guesses relate to
> your description.
> 
> If I understood your description properly, you might
> be interested in something like:
>       b-+/\.&.|. a
> 25.5 13.5 _0.5 _16.5 _34.5
> or
>    0 >. b-+/\.&.|. a
> 25.5 13.5 0 0 0
> 
> But I am not at all confident that this is what you
> are looking for.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to