MathGroup Archive 2012

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

Search the Archive

Re: How to plot divergence of gradient as contour plot


Szymon Roziewski wrote:

> Hello there,
>
> I am concerning to plot something like that.
>
> ContourPlot[Divergence[Gradient[Sin[x + y]]], {x, -5, 5}, {y, -5, 5}]
>
> Plotting divergence of gradient scalar field.
> How can I manage to do that?
>
> Best regards,
> Szymon Roziewski

Try this:

Needs["VectorAnalysis`"]
SetCoordinates[Cartesian[x,y,z]]   (*usual cartesian coordinates *)

ContourPlot[Evaluate@Div@Grad[Sin[x+y]],{x,-5,5},{y,-5,5}]

You need to include Evaluate, dew to the way Plot works.

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de



  • Prev by Date: Re: How to plot divergence of gradient as contour plot
  • Next by Date: SortBy won't order irrationals
  • Previous by thread: Re: How to plot divergence of gradient as contour plot
  • Next by thread: Re: How to plot divergence of gradient as contour plot