Skip to main content
5 of 6
added 8 characters in body
lachis83
  • 1.8k
  • 3
  • 16
  • 9

How can I save and recall my own function?

Possible Duplicate:
Save interpolated function

In MATLAB, I can save and recall my own function using an M-File(function or script)
How can I do something similar in Mathematica?

I already searched and know how to define functions and modules like the following:

f[x_]:=Sin[x]+Cos[x] g[x_]:=Module[{a}, a*f[x]] 

When I restart Mathematica, however, my own function is deleted.

Of course, I can save my notebook(.nb) file, but it is just saving my script, not saving my definition of the function.

How can I deal with this problem?

lachis83
  • 1.8k
  • 3
  • 16
  • 9