Sorry, but that brings back the error on (n-1) ffrom i.n :

   3 ffrom3 i.4
|length error: ffrom3
|   mult    +/^:(#x)@:*range{y
   
as opposed to

   3 ffrom i.4
3

(like 3 { i.4 )

Ben

-----Original Message-----
From: [email protected] on behalf of Raul Miller
Sent: Sun 1/23/2011 10:46 PM
To: Programming forum
Subject: Re: [Jprogramming] Floating from
 
On Sun, Jan 23, 2011 at 3:33 PM, Marshall Lochbaum
<[email protected]> wrote:
> One correction to ffrom2:
>
>   ffrom2=:4 :0 "0 _
> x=.,>x
> range=. { (<.,>.)&.> x
> mult=. *// (,.~-.) (-<.) x
> mult +/^:(#x)@:* range{y
> )
>
>
> However, I would like to see a version that only uses the one value if an
> integer is given (mine uses two copies of the same value and gives weight 1
> to one of them and 0 to the other).

Perhaps:
   range=. { (<.~.@,>.)&.> x
?

-- 
Raul
----------------------------------------------------------------------
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