Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to define a function for later use' topicStudent Support Forum > General > "How to define a function for later use"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/09/12 10:21pm

You can save your function definition in a notebook .nb file and load that notebook before beginning the next time.

Just loading that notebook will not automatically evaluate your definition, you must again evaluate the definition for Mathematica to use the definition.

It is possible, if this is a definition that you will want to use every time to modify the properties of the cell to make Mathematica automatically evaluate that cell with your fuction definition every time you load the notebook. That is documented here.

http://reference.wolfram.com/mathematica/ref/menuitem/InitializationCell.html

You should be careful with that.

It is possible, if you are careful and do not make any mistakes, to modify the init.m file that Mathematica will use each time it starts. This is documented here.

http://reference.wolfram.com/mathematica/ref/file/init.m.html

You should be careful with that.

Easiest and safest is to save your definition in a .nb file before exiting, load the .nb file the next time you start and evaluate the definitions you want to use.

URL: ,

Subject (listing for 'How to define a function for later use')
Author Date Posted
How to define a function for later use Pedro 09/09/12 7:34pm
Re: How to define a function for later use Bill Simpson 09/09/12 10:21pm
< Previous CommentHelp | Reply To Comment | Reply To Topic