Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Begginer's question: Saving a function for later use
Replies: 4   Last Post: Sep 14, 2012 12:15 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dr.J

Posts: 22
Registered: 5/30/12
Re: Begginer's question: Saving a function for later use
Posted: Sep 11, 2012 2:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Hi Pedro,

You can save your notebook which contains this function as a .m file then
whenever you want call this function, you just type Get["*.m"] or << *.m
in your working notebook.

Or, you can save it as a notebook and use opennotebook function in your
working notebook.

Hope this helps.


On Mon, Sep 10, 2012 at 10:05 AM, <pedro.roberto@campus.ul.pt> wrote:

> Hello,
> I'm just getting started on Mathematica and trying to define a function
> for later use. The function is just:
>
> test[x_]:=x^2
>
> While I don't close mathematica, I can use the function on my notebooks
> but when I close it, the function disappers, I tried to save a .m file with
> it but It didn't work. What do I do?
>
> Thanks for time,
> Pedro
>
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.