When I execute this code:
\[Sigma] = 0.3;
\[Mu] = 5;
xmax = 10;
f[x_]= Exp [-(1/2) ((x - \[Mu])/\[Sigma])^2]/(\[Sigma]*Sqrt[2*\[Pi]]);
Plot[f[x], {x, 0, xmax}, PlotRange -> {0, +2}]
I get the plot:
But when I change f to g..
\[Sigma] = 0.3;
\[Mu] = 5;
xmax = 10;
g[x_]= Exp [-(1/2) ((x - \[Mu])/\[Sigma])^2]/(\[Sigma]*Sqrt[2*\[Pi]]);
Plot[g[x], {x, 0, xmax}, PlotRange -> {0, +2}]
I do not get anything:
Do we always have to use f as the function being plotted? Or am I missing something important here?
Clear[g]
and give it another go $\endgroup$g
or one of the constants or something that's getting in the way. $\endgroup$ClearAll[g]
(for func.g
). That's how I disable cached definitions. $\endgroup$