Testing for unevaluated functions
- To: mathgroup at yoda.physics.unc.edu (Mathematica Group)
- Subject: Testing for unevaluated functions
- From: jake at skatter.usask.ca (Jason Breckenridge)
- Date: Mon, 28 Sep 92 19:42:54 CST
I have a question that I cannot seem to find the answer to in any of the Mma
books that I have available.
I would like to build a function that uses FindMinimum to search for a
minimum (obviously). The problem is that as one varies one of the parameters
of the function, a definite min. will move outside of the range of the search.
I would like to test for this condition, and if Find Minimum cannot find a
minimum=, then use one of the endpoints.
The question is, is there no general mechanism for testing the return status
of a function, or at least a built-in function?
I would have thought tha there would be a way to write something like:
If[UnevaluatedQ[FindMinimum[blah]], endpoint, FindMinimum[blah]]
but I can't seem to find anything about any sort of "UnevaluatedQ" in the
Testing whether you get a list or not and then taking the list apart seems
a tad inelegant.
Thanks in advance for any info/suggestions.
Prev by Date:
Next by Date:
Previous by thread:
Re: Statistical packages
Next by thread:
Re: Testing for unevaluated functions