Re: Branching on error messages?
- To: mathgroup at smc.vnet.net
- Subject: [mg108978] Re: Branching on error messages?
- From: "Carl K. Woll" <carlw at wolfram.com>
- Date: Thu, 8 Apr 2010 08:39:02 -0400 (EDT)
- References: <201004081159.HAA08018@smc.vnet.net>
Look up Check. Carl Woll Wolfram Research On 4/8/2010 7:59 AM, Jack L Goldberg 1 wrote: > Hi Folks, > > In a module I have written I call Reduce and in the most common case, > Reduce does exactly what I want. In some rarer cases, however, Reduce > returns the error message > > Reduce::nsmet: ... (basically, Reduce doesn't know how to simplify > transcendental equations.) > > Suppose in Line L6 of my module I have this code > > L6 = Reduce[L5, var, Reals]; > > I want something like this instead, > > L6 = If[ Reduce[L5, var, Reals] generates no error message, > Reduce[L5,var,Reals], Module[ ... ]; > > So if there is an error message, we go to Module[...] which I hope > corrects things by introducing numerical methods. > > An alternative is this: Define newReduce which acts like Reduce when > no error message of the type Reduce::nsmet occurs and uses my > numerical techniques otherwise. > > I am unsure how to code L6 or whether to explore defining my own newReduce? > Any guidance is appreciated, as usual. > > Jack > > > >
- References:
- Branching on error messages?
- From: Jack L Goldberg 1 <jackgold@umich.edu>
- Branching on error messages?