MathGroup Archive 1999

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

Search the Archive

Re: goto & Findmininimum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20943] Re: goto & Findmininimum
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 1 Dec 1999 01:50:11 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <81a0ca$8p9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Albert Maydeu-Olivares wrote:
> 
> Greetings,
> 
> I have a Do loop of the type
> 
> Do[
> Label[begin]
> Generate Data
> FindMinimum
> Do something to the result, {times}]
> 
> When FindMinimum does not converge in x iterations it gives the message
> 
> FindMinimum::"fmlim": "The minimum could not be bracketed in x iterations."
> 
> How do I get Mathematica to transfer control to "begin" using Goto when
> FindMininumn does not converge?
> 
> Albert

Hi, 

Do[
While[res===$Failed,
   res=Check[
      Generate Data
      FindMinimum,
      $Failed,
      FindMinimum::fmlim
     ];
  If[res=!=$Failed,Do something to the result; Break[]];
]
Do something to the result, 
{times}]

will hopefully work
  
Regards
  Jens


  • Prev by Date: calculus with Grassmann variables
  • Next by Date: Re: Calling a c++ dll with Mathlink
  • Previous by thread: Re: calculus with Grassmann variables
  • Next by thread: Re: goto & Findmininimum