Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica help.

  1. Feb 5, 2008 #1
    can someone help me out with a mathematica problem ( i use mathematica 6)? I have never used this program before and really don't know what to do or where to start. So if someone could give me a little light that would be great.


    -last graph is g(x,y)=
    Last edited: Feb 5, 2008
  2. jcsd
  3. Feb 5, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    These must have been produced by Plot3D in Math'ca.

    For example,

    Plot3D[Cos[x y], {x, -3 \[Pi], 3 \[Pi]}, {y, -3 \[Pi], 3 \[Pi]}]

    then shift+enter.

    First thing I'd do is to hold & rotate the graph to change the ViewPoint.

    To change it explicitly, you can type for example:

    Plot3D[Cos[x y], {x, -3 \[Pi], 3 \[Pi]}, {y, -3 \[Pi], 3 \[Pi]}, ViewPoint -> {-1, 0, -3}]

    Another thing to try is to change the plot limits from {x, -3 \[Pi], 3 \[Pi]} to (say) {x, -\[Pi], \[Pi]} (same for y).
  4. Feb 5, 2008 #3
    ok thanks for the reply. my question is, it says make surface and contour plots for suitable intervals, viewpoints, and resolutions. For example f(x,y) = cos(xy) for -3pi <= x,y <= 3pi , that is 1 of the equations for the question. So to make surface and contour plots(many of them) do I just plug other numbers in for -3pi and 3pi? Confused on what I need to do.
  5. Feb 5, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper

    You should make a surface plot and a contour plot for:

    a. suitable intervals,

    b. suitable viewpoints, and

    c. suitable resolutions

    for each function f, g, etc.

    "Plugging other numbers in for -3pi and 3pi" addresses item a.
  6. Feb 5, 2008 #5
    i've got it all down now except the resolutions. I have tried searching for it on google and mathematica and i can't find anything on how to do it. It says. to draw surface and contour plots for resolutions. I dont know what that means? can someone explain?
  7. Feb 6, 2008 #6
    try searching in the master index in mathematica it is very good (help -> master index)
  8. Feb 6, 2008 #7


    User Avatar
    Science Advisor
    Homework Helper

    My guess is, "resolution" means "density" of the plot. For example in a ContourPlot, the number of contours you specify manually, as an option.

    Alternatively, resolution can mean sampling frequency. Mathematica has a default sampling frequency when plotting graphs. You can change it by specifying a step size as part of the domain specification. For example:

    {x, -\[Pi], \[Pi]} produces default sampling

    {x, -\[Pi], \[Pi], \[Pi]/180} produces sampling along the x-axis with step size = 1 degree.
    Last edited: Feb 6, 2008
  9. Feb 6, 2008 #8
    I noticed that a version of convert-pdf was used. If that free trial runs out, try searching for "cute pdf"...

    sorry i didn't have anything of much value to add other than that...
  10. Feb 7, 2008 #9


    User Avatar
    Science Advisor
    Homework Helper

    Re my last post above:

    If {x, -\[Pi], \[Pi], \[Pi]/180} doesn't work try putting in the option WorkingPrecision -> value in the Plot statement where the default value is MachinePrecision but you can specify a numeric value to increase plot precision (e.g. WorkingPrecision -> 20).

    You can also experiment with Mesh and MeshFunctions options. For example:
    Plot[Tan[x], {x, 0, Pi/2}, Mesh -> {5, 10}, MeshFunctions -> {#1 &, #2 &}]
    Last edited: Feb 7, 2008
  11. Feb 1, 2012 #10
    I have struggled with bad resolution and quality in RegionPlot for a long time. In particular this is a problem for complicated multiple conditions. The way to solve it is to add PerformanceGoal and MaxRecursion:

    RegionPlot[ f(x,y)>0 && g(x,y)>0, {x,xmin,xmax},{y,ymin,ymax},
    PerformanceGoal -> "Quality", MaxRecursion -> 8]

    I suspect that the default values are PerformanceGoal -> "Speed", MaxRecursion -> 1. The speed and quality seems to be very sensitive to MaxRecursion, so experiment a bit with different values.

    ( google keywords: resolution RegionPlot Mathematica )
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Mathematica help.
  1. Mathematica help (Replies: 1)

  2. Help With Mathematica (Replies: 2)

  3. Mathematica help (Replies: 1)

  4. Help in Mathematica (Replies: 15)

  5. Help with Mathematica? (Replies: 1)