Message Boards Message Boards

0
|
3922 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Creating a library of functions: How?

Posted 3 years ago

I have a collection of functions used in almost all my notebooks, e.g. volume of a n-dimensional sphere. Right now I type the definitions into every new notebook. Can someone please point me to the documentation on how to store the definitions on disk and then just load them into notebooks?

I am a C programmer so I think in terms of .h files and include statements.

POSTED BY: Dave Lubbers

Put your definitions in a .m file of .txt file, and then use the Get command.

Get["MyFile.txt"]

or using the << notation:

<< "MyFile.txt"

That should work. See the help of Get (ref/Get).

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

Group Abstract Group Abstract