Group Abstract Group Abstract

Message Boards Message Boards

Plot NMinimize output to a range of a certain variable?

Posted 6 years ago

My problem is similar to this question, but with a slight difference. My original function has a few more variables and needs to be minimized by NMinimize. Here is a simple exemple of my problem, based on the solution here.

mydata2 = 
 Table[{x, y} /. 
   NMinimize[{2*Exp[-x] + 0.5*Sin[z] Exp[-y], x >= 0 , y >= 0}, {x, 
      y}][[2]], {z, 0, 3, .1}]

myminima = 
 Table[2*Exp[-#[[1]]] + 0.5*Sin[z] Exp[-#[[2]]] & /@ mydata, {z, 0, 
   3, .1}]

myzvalues = Table[z, {z, 0, 3, .1}]
ListPlot[Transpose[{myzvalues, myminima}]]
POSTED BY: Jose richard
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard