Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.9K Views
|
7 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Why does FindMinimum return 'The function value Null is not a real number'?

Posted 11 years ago
POSTED BY: Marco Gorelli
7 Replies

If I plot your function, it appears to have a lot of discontinuous steps in it with a general trend of decreasing for m greater than about 5.5.

POSTED BY: Frank Kampas
POSTED BY: Frank Kampas
Posted 11 years ago
POSTED BY: Marco Gorelli

NumberQ returns True means the argument is a number. I suspect NumberQ is not the function you wanted to use. It might also be simpler to use the While function rather than Throw and Catch. Also note that cm is a new variable. If you want c*m you need to put a space between them or a multiplication symbol.

POSTED BY: Frank Kampas
Posted 11 years ago
POSTED BY: Marco Gorelli

For optimizing a numerical function, the best approach for FindMinimum is to define a function and specify that the argument or arguments are numeric using _?NumberQ

POSTED BY: Frank Kampas
Posted 11 years ago
POSTED BY: Marco Gorelli
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard