MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to evaluate a function and graph it--part 2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43464] Re: How to evaluate a function and graph it--part 2
  • From: martins.pires at netvisao.pt (Rui)
  • Date: Wed, 17 Sep 2003 07:59:56 -0400 (EDT)
  • References: <bi7nik$p8f$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Rebeca

Try this:

f[x_, y_] := x^4 + 3 x^2 + 5 y^2 + x + y;

m = FindMinimum[f[x, y], {x, -3, 4}, {y, -3, 4.3}]

{xmin, ymin} = {m[[2, 1, 2]], m[[2, 2, 2]]};

fplot = fplot = Plot3D[f[x, y], {x, -3, 4}, {y, -3, 4.3}, 
      DisplayFunction -> Identity];
Show[fplot,
	Graphics3D[{PointSize[0.02], Hue[0], 
        Point[{xmin, ymin, 1 + f[xmin, ymin]}]}], 
    DisplayFunction -> $DisplayFunction];

ContourPlot[f[x, y], {x, -3, 4}, {y, -3, 4.3}, ContourShading -> False, 
    Contours -> 20, 
    Epilog -> {{PointSize[.02], Hue[0], Point[{xmin, ymin}]}}];

I hope this is what you want.


  • Prev by Date: A face-to-face Mathematica consultant wanted
  • Next by Date: Mapping Write
  • Previous by thread: A face-to-face Mathematica consultant wanted
  • Next by thread: Mapping Write