Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.5K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

how can i define a function in mathematica?

Posted 12 years ago

I am new in Mathematica.

in matlab i define a function as: f(x)=x+1 then if i type f(2) answer is 3. how can i do this in mathematica.

POSTED BY: esi fn
2 Replies
POSTED BY: David Reiss

In Mathematica, if you want to define a function, say x+y+z, we have to the following, f[x_ , y_ ,z_] := x+y+z (shift+enter) f[2,1,3]=6 for further information, see documentation.

POSTED BY: suvadip mandal
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard