Clear[ a, ball, wally ] a = 6 ball = -5 wally = 2 + ball * a^2Output:
Clear[ z ] z = 7;
Clear[ f, x ] f[x_] = 3 x + 1;
Plot[ f[x], {x, -2, 10} ];
This second example plots two functions on the same graph with x^2 being blue and 9x+5 being red.
Plot[ { x^2, 9 x + 5}, {x, -5, 15},
PlotStyle->{{Blue}, {Red}} ];
Clear[ p1, p2, x, v ]
p1 = Plot[ 25 x - 2, {x, -10, 10}, PlotStyle->{{Blue}}];
p2 = Plot[ -20 v + 3, {v, -15, 20}, PlotStyle->{{Red}}];
Show[ p1, p2 ]
The output from the above code will be
Clear[ p1, p2, x, v ]
p1 = Plot[ 25 x - 2, {x, -10, 10}, PlotStyle->{{Blue}},
DisplayFunction->Identity];
p2 = Plot[ -20 v + 3, {v, -15, 20}, PlotStyle->{{Red}},
DisplayFunction->Identity];
Show[ p1, p2, DisplayFunction->$DisplayFunction ]
The output from the above code will be a plot of both
|
Written by Keith Schreiner Modified 1/27/97 Send corrections or comments to schreinr@uiuc.edu |
Copyright © 2006 Calculus & Mathematica at UIUC
|
|