MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to use package without manually evaluating?



The way that I would do it is:


1) Create a MyApplication (or whatever name you wish) folder in your
$UserBaseDirectory/Applications folder.

2) Make your posted file a Matrices.nb notebook file. Make each of the cells
an Initialization cell.  

3) Change the BeginPackage statement to:




4) Save the notebook as an "Auto Generated Package" in your MyApplications
folder. (If it already exists as a notebook you can use the Options
Inspector to do this.) This automatically creates the Matrices.m file and
anytime you edit and save the Matrices.nb notebook, the Matrices.m package
file will be updated.


5) Load the package with the statement:




You could make that statement an Initialization cell in your working
notebooks. But when you save those notebooks DON'T  make them Auto Generated


Generally your private Applications folder is the best place to put
packages. Mathematica automatically knows how to find them there. You may
not want this package loaded EVERY time you use Mathematica. I haven't
examined you package code completely but it seems that you have written some
routines that don't have usage statements. You need a usage statement for
each routine you want to export and have access to.


David Park

djmpark at



  • Prev by Date: Re: FindMinimum
  • Next by Date: Re: FindMinimum
  • Previous by thread: Re: How to use package without manually evaluating?
  • Next by thread: Re: How to use package without manually evaluating?