Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Full function notation f(x,y) vs just f' topicStudent Support Forum > General > "Full function notation f(x,y) vs just f"

< Previous CommentHelp | Reply To Comment | Reply To Topic
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: ,

Subject (listing for 'Full function notation f(x,y) vs just f')
Author Date Posted
Full function notation f(x,y) vs just f Giovanni 11/23/12 09:32am
Re: Full function notation f(x,y) vs just f Sumit 11/24/12 00:59am
< Previous CommentHelp | Reply To Comment | Reply To Topic