Re: what corresponds to work folder in mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg86105] Re: what corresponds to work folder in mathematica
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Sun, 2 Mar 2008 13:54:32 -0500 (EST)
- References: <fq8ro9$ksj$1@smc.vnet.net>
tdoxmail at gmail.com wrote: > hello > > As in another system , we have work folder, where I can keep the .m file with > the function i have created and use it directly in my other code. > > Is ther any thing such in Mathematica, where I can keep the .nb file > having the code of my function and call it in any other file > > > -Thank You > > Gracias > There are two main types of Mathematica file - notebooks with a .nb suffix, and package files (an unfortunate name, because a .m file can contain any code, not necessarily a package) which have a .m suffix. I would recommend that you start by using notebooks. It is important to realise that notebooks can contain code - just as a .m file - and it has the advantage that a notebook will save your results as well. It is also important to realise that you can open several notebooks (or .m files) at the same time. Thus you could open a notebook containing code, execute it, activate whatever definitions it contains, and then use those definitions in another notebook. Simply create a folder wherever is convenient for you, start Mathematica, do a calculation in the untitled notebook that is created for you, and then use the menu item File/Save As. This will let you name your file and place it in your folder. David Bailey http://www.dbaileyconsultancy.co.uk