|
[Date Index]
[Thread Index]
[Author Index]
Re: including files
- To: mathgroup at smc.vnet.net
- Subject: [mg53181] Re: including files
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Tue, 28 Dec 2004 06:30:24 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 12/27/04 at 6:41 AM, ranjan.grover at gmail.com (Ranjan Grover)
wrote:
>I wanted to setup an include file that has data on physical
>constants so that I can include it for all my Mathematica programs
>using the << command. Since I've never done this before, I'm not
>really sure if a notebook file can be included or whether the
>include file has to be a .m file.
>I tried using the SetDirectory[] command to set the working
>directory and then included a .nb file which had all the data in it
>but that didn't work out. I was able to read the file in but the
>expressions in it were not being evaluated. Can anyone clue me in?
My suggestion would be to use a .m file. These are very easily created.
From within Mathematica, enter all of the expressions you want evaluated into a notebook. Select the cells with those expressions and set the cell properties as Initialization Cells. Finally, save the notebook in package format using File->Save As Special->Package Format.
Alternatively, a .m file can be created with any third party text editor. Simply type the desired expressions and save the result with an extension of .m.
--
To reply via email subtract one hundred and four
Prev by Date:
Re: including files
Next by Date:
Re: Condition , FullSimplify
Previous by thread:
Re: including files
Next by thread:
Re: including files
|