Group Abstract Group Abstract

Message Boards Message Boards

Debugging fitting data and empty plot

My code is not executing the fitting command and return an empty plot. Appreciate any pointers. Thanks

POSTED BY: Sahrawi Chaib
4 Replies

Starting points are entered like this:

NMinimize[{x^2 + (y - .5)^2, y >= 0 && y >= x + 1}, {{x, stargingPointX},{y,startingPointY}}]
POSTED BY: Gianluca Gorni

You are using the syntax of FindMinimum in NMinimize.

NMinimize does not use starting points.

POSTED BY: Gianluca Gorni

Here is a simple code that uses "starting points" NMinimize[{x^2 + (y - .5)^2, y >= 0 && y >= x + 1}, {x, y}]

POSTED BY: Sahrawi Chaib

Below shows a simple example of how to specify "starting points" in NMinimize[]. The methods used by NMinimize[] usually need several starting points, at least n+1, where n is the number of variables.

NMinimize[{x^2 + (y - .5)^2, y >= 0 && y >= x + 1}, {x, y}, 
 Method -> {Automatic, "InitialPoints" -> {{0, 1}, {0, 4}, {2, 4}}}]

I believe NMinimize[] will add extra points if needed. A specific method instead of Automatic may be used.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard