Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Detecting unsuccessful computations

  • To: mathgroup at
  • Subject: [mg39319] Re: Detecting unsuccessful computations
  • From: Mike Yukish <may106 at>
  • Date: Tue, 11 Feb 2003 04:41:46 -0500 (EST)
  • Organization: Penn State University, Center for Academic Computing
  • References: <b27fn8$n9t$>
  • Sender: owner-wri-mathgroup at

Uri Zwick wrote:

> Hi,
> Mathematica functions such as LinearSolve, LinearProgramming,
> FindMinimum and many others, sometimes cannot perform the
> requested task. (The linear system of equations has no solution, the
> linear program has no feasible points, etc.)


> What is the recommended way of calling a function like
> LinearProgramming and getting an indication that something
> went wrong, WITHOUT getting any error message printed?

Had just this problem myself. Solution for me is a two-parter. First, wrap
the FindMinimum[ ] code or other in a Check[ ] function, to act on the

Second, wrap this in a Block that redirects the $Messages pipe temporarily.
So you get...

         FindMinimum[blah, blah, blah],
         OopsWhatToDoIfAnError[ ]

Read the Mathematica help on $Messages and on Check for more info

  • Prev by Date: Re: Finding multiple roots - RootsInRange.nb (1/1)
  • Next by Date: Re: I need some help about this error
  • Previous by thread: Detecting unsuccessful computations
  • Next by thread: Re: Detecting unsuccessful computations