Hi Gian!
The mean value of ?30 is not 15 but 14.5.
(+/%#)i.30
14.5
Is there a point in using <.&<. rather than <. ?
Note that (((+/ % #)*1+#)-(+/))) is equal to (+/ % #)
When you apply a multiplicative noise, you should multiply by ^noise rather
than 1+noise.
So your bestfit calculation may look somewhat like this:
(],0{&<.0.5+(([:^0.01*_14.5+[:? 30"_)* +/ % #))90 90 90
90 90 90 92
- Bo
>________________________________
>Fra: Henry Rich <[email protected]>
>Til: Programming forum <[email protected]>
>Sendt: 11:25 onsdag den 5. oktober 2011
>Emne: Re: [Jprogramming] Tacit vs. Explicit
>
>bestfit=:(],0{&<.&<.0.5+(1+0.01*_15+(?@(30"_)))*(((+/ % #)*1+#)-(+/)))
> bestfit 90 90 90
>90 90 90 101
> bestfit 90 90 90
>90 90 90 102
> bestfit 90 90 90
>90 90 90 103
> bestfit 90 90 90
>90 90 90 78
>
>Henry Rich
>
>On 10/5/2011 5:19 AM, Gian Medri wrote:
>> Hi!
>> I have a function:
>> bestfit=:(],0{&<.&<.0.5+(1+0.01*(?30)-15)*(((+/ % #)*1+#)-(+/)))
>> that calculates the n+1 element.
>> bestfit 90 90 90
>> 90 90 90 81
>> The tacit form doesn't work properly, because the "?" is not active every
>> time I call bestfit 90 90 90.
>> When I use
>> (],0{&<.&<.0.5+(1+0.01*(?50)-25)*(((+/ % #)*1+#)-(+/))) 90 90 90
>> then the function works properly.
>>
>> My question is if it is possible to have a tacit verb with the "?" active.
>>
>> Thanks
>>
>> 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
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm