Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.6K 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 11 years ago

It's c*m.

Ok, I'll try, thanks.

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

I've now tried this f[m_?NumberQ] := Catch[Do[a = 2^(m(1 - c)) - 2.718/((m^.5)23.14c^(cm + .5) (1 - c)^((1 - c)*m + .5)); If[a <= 0, Throw[m/(m (1 - c) + 1)]], {c, 0.006, 1, 0.001}]]

however, FindMinimum still doesn't work and tells me I'm making invalid comparisons.

POSTED BY: Marco Gorelli
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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard