Thank you Raul,you give the general term formula from the iterative formula.
My original difficult is when using u/y to do  the tacit iteration,how
to handle the left (control)  argument,now i recall that it can be
pack into the right (data) argument firstly,so
EMA1=:((<a:;1)&{)@:((([EMAIL PROTECTED] , (*/@[) + (1- [EMAIL PROTECTED]) * 
{:@])/\.)&.|.)@:,.
(0.1&EMA -: 0.1&EMA1) p: i.10
1


2008/3/8, Raul Miller <[EMAIL PROTECTED]>:
> On 3/7/08, Xu Zuoqian <[EMAIL PROTECTED]> wrote:
>  > EMA=:((2 % [:>: #) $: ])  : (4 :'(((x * [) +  (-.x) * ])/\.)&.|. y')
>  > Can it be convert to a tacit train?
>
>
> Yes.
>
>  But I think your explicit version should be significantly
>  more efficient for long arguments:
>
>    ema=: +/ .* (((1 {.~ #) >. K * <:/~) * (1 - K) ^ [: - -/~)@[EMAIL 
> PROTECTED]
>    (EMA -: ema) p:i.10
>  1
>
>  --
>
> 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