salbrecht
(Sandra Albrecht)
April 26, 2015, 1:41pm
1
Hello,
im trying to make som graphics with my Mathematica:
f[x_, y_] := (1 - x^2 - y^2)/(1 + x^2 + y^2)
a := -4
b := 4
c := -5
d := 5
F = Plot3D[
f[x, y], {x, a, b}, {y, c, d},
PlotLabel → “3D.Diagramm”,
AspectRatio → 1/GoldenRatio,
AxesLabel → {“x”, “y”, “z”},
PlotRange → {{a, b}, {c, d}, {-1, 1}}
]
Diagramm = ContourPlot[
f[x, y], {x, a, b}, {y, c, d},
PlotLabel → “Höhendiagramm”,
ColorFunction → “BlueGreenYellow”,
AspectRatio → 1/GoldenRatio
]
And as an answer i get: “Tag Graphics [in x_,y_] is protected”
Can anyone help me?
Thanks
sukrause
(Udo Krause)
April 26, 2015, 1:57pm
2
Stick a bit to the syntax and everything works:
ClearAll[f, a, b, c, d]
f[x_, y_] := (1 - x^2 - y^2)/(1 + x^2 + y^2)
a = -4; b = 4; c = -5; d = 5
(* F= *)Plot3D[f[x, y], {x, a, b}, {y, c, d},
PlotLabel -> "3D.Diagramm", AspectRatio -> 1/GoldenRatio,
AxesLabel -> {"x", "y", "z"}, PlotRange -> {{a, b}, {c, d}, {-1, 1}}]
(* Diagramm= *)ContourPlot[f[x, y], {x, a, b}, {y, c, d},
PlotLabel -> "Höhendiagramm", ColorFunction -> "BlueGreenYellow",
AspectRatio -> 1/GoldenRatio]
the function definition was in error and the definition for a,b,and c needs a closing semicolon. d as the last one can go without a semicolon: CompoundExpression