Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.4K Views
|
8 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Trying to plot a function in Mathematica

Posted 12 years ago

Trying this plot command

Plot[p^2/((p^2 - k^2) (p^2 + m^2)), {p, 0, k}]

and Mathematica gives some cryptic message!

POSTED BY: Yaj Bhattacharya
8 Replies
POSTED BY: Marco Thiel
POSTED BY: Marco Thiel
POSTED BY: Yaj Bhattacharya

I am not quite sure what you want to achieve, but this might help:

Manipulate[If[k == 0, "Not Defined", Plot[p^2/((p^2 - k^2) (p^2 + m^2)), {p, 0, k}]], {m, -10, 10}, {k, -10, 10}]

enter image description here

To plot the function it "pre-sets" m and k for you, but you can change them with the sliders. I also added a "not defined" output when k==0.

M.

POSTED BY: Marco Thiel

Plot can not be called with multiple variables. Only one.

POSTED BY: Sander Huisman
Posted 12 years ago

I think the function you want to plot consist in three variables, so plot is as follows

Plot[f[x,y,z],{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]

in your case the vairables are m,k,p

but maybe one of them is constant or two of them. you know If is three dimensional is Plot3D[.....]

POSTED BY: Charls Mejía

And the value of m!

POSTED BY: Sander Huisman

You didn't tell it the value of k.

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