MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Forcing output in FindMinimum


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12617] Re: Forcing output in FindMinimum
  • From: "Culioli JC" <culioli@cas.ensmp.fr>
  • Date: Tue, 26 May 1998 02:38:17 -0400
  • Organization: Ecole des Mines de Paris
  • References: <6k7d8d$1if@smc.vnet.net> <6kb1i7$3lp@smc.vnet.net>

Allan Hayes a crit dans le message <6kb1i7$3lp@smc.vnet.net>...
>Hossein,
>
>The following is based on an earlier posting of David Withoff
>
>In[1]:>Clear[GetParameter]
>In[2]:>Attributes[GetParameter]oldAll;
>In[3]:>GetParameter[expr_, n_]:>  ( Unprotect[Message];
>    Message[ n,  p_,q___]:~ll/;{par ›False};
>    Protect[Message];
>       Check[expr,par,n]
>  )
>
>In[4]:>GetParameter[FindMinimum[-Sin[Pi x],{x,0,0,.3}],
> FindMinimum::regex]
>
>FindMinimum::"regex":
>    "Reached the point 0.3` which is outside the region {{0., 0.3}}
>
>Out[4]>0.3
>
>------------------------------------------------------------- Allan
>Hayes
>Training and Consulting
>Leicester UK
>http://www.haystack.demon.co.uk
>hay@haystack.demon.co.uk
>voice: +44 (0)116 271 4198
>fax: +44(0)116 271 8642
>


Hello all,
you can also do the following :

FindMinimum[y-Sin[Pi x],{x,0,0,.3}];y

the result will be in y.
You can also store all the values FindMinimum went through with the
following :

ylist };FindMinimum[AppendTo[ylist,x];-Sin[Pi x],{x,0,0,.3}];ylist

this helps to known what FindMinimum is doing.

Cheers.



  • Prev by Date: Re: waterfall plot in Mathematica
  • Next by Date: Re: Re: Finding the Path to the Active Notebook
  • Prev by thread: Re: Forcing output in FindMinimum
  • Next by thread: Out of Memory Bug; was Re: swap usage