PureBytes Links
Trading Reference Links
|
Herman,
if it doesn't bother, post the specific question, we may find a quick
solution.
There was a similar question by Anthony last week [re:ANGLE].
One solution would be to search ALL decimals from 0 to 100 and ask
the specific ANGLE value. Very time consuming and inaccurate, since
there were more than one solutions between 52.10 and 52.11.
I solved it using another principle and the solution was simple,
unique and elegant.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx>
wrote:
> thanks DT, I have to study your code but I think you have the
general idea.
> I have an impossible formula to transform (it contains HHV and LLVs,
> stochastic mutation) and want to find the x that would give me the
given y.
> Right now I linearly increment x untill I hit my y-target, this is
awfully
> slow.
>
> like y = function(x); // y ranges 0-100 and I want 2 decimal places
for x
> that gives me a given y
>
> I thought cutting the range in half, see whether it is greater or
less, cut
> the result in half again, etc. I am not a math guy but I have used
> AD-converters that worked like that and what we can do in hardware
we can do
> in software :-)
>
> thanks for the starter DT,
> herman
>
>
>
>
> -----Original Message-----
> From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> Sent: January 28, 2004 9:18 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Successive Approximation in afl
>
>
> Herman,
> You mean a procedure like this
>
> a=1;b=2;z=0;
> st0=0.1;st1=0.01;st2=0.01;
> //1st decimal
> for(i=a;i<b;i=i+st0)
> {
> if(i^2<2 AND (i+st0)^2>2)
> z=i;
> }
> //2nd decimal
> for(i=z;i<z+st0;i=i+st1)
> {
> if(i^2<2 AND (i+st1)^2>2)
> z=i;
> }
> //...etc
> Plot(z,"sqrt(2)",1,1);
>
> to find sqrt(2) without using all the values from 1 to 2 ?
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen"
<psytek@xxxx>
> wrote:
> > Hello,
> >
> > has anybody come accross a successive approximation routine in
afl?
> Or
> > perhaps js?
> >
> > thanks,
> > herman
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
>
> --------------------------------------------------------------------
--------
> --
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>
> b.. To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|