Re: Create Permanent Self Defined Function?

*To*: mathgroup at smc.vnet.net*Subject*: [mg54150] Re: Create Permanent Self Defined Function?*From*: Curt Fischer <tentrillion at gmail.NOSPAM.com>*Date*: Sat, 12 Feb 2005 01:56:57 -0500 (EST)*References*: <cuhr6m$97t$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Mary Beth Mulcahy wrote: > Basically, I would like to create a new "built in" function that can be stored > in my Mathematica and used for future sessions like, for example, BesselJ[n, > z] or the Exp[] functions are. I am doing this because I am playing around > with the OriginLab link and it would be much easier if I could just call a > function up while in Origin instead of typing it into the Mathematica > interface box. I definitely can do it, but it would be slick to be able to > just call it up, even in Mathematica so that I didn't have to cut and paste > all the time. Mary Beth, One way to do this is to add the function definition to your init.m file , the location of which depends on your OS. On Windows XP with Mathematica 5.0.1 for Students, I opened up C:\Program Files\Wolfram Research\Mathematica\5.0\Configuration\Kernel\init.m with any decent text editor and appended the line marybethEG[x_]:=x+1 to the file. The kernel automatically loads the contents of that file so you can do In[1]:= marybethEG[7] Out[1]= 8 -- Curt Fischer