| Author |
Comment/Response |
Sumit
|
11/24/12 00:59am
HI, Giovanni,
Let me start from the second one. I think the solution is to define a variable, not a function. Like
g[x_, y_] := x^2 + y^2
f := g[x, y]
Now you can use either g[x,y] or f as you wish
Plot3D[Exp[-g[x, y]], {x, -1, 1}, {y, -1, 1}]
Plot3D[Exp[-f], {x, -1, 1}, {y, -1, 1}]
will give same thing.
Now I am not sure about the first part.If you want it only for output purpose you can use StringReplace. For example
StringReplace["Sin[f[x]]+f[x]^2", "f[x]" -> "f"]
gives
"Sin[f]+f^2"
Hope it will help.
Best
-Sumit
URL: , |
|