Questions on Mathematica packages, which are self-contained bundles of Mathematica code that add new functions and other functionality.

learn more… | top users | synonyms (1)

11
votes
1answer
655 views

user defined functions, how to save them for future use?

I need certain user defined functions over and over. I was wondering how can I define and where and how to save them such that each time I start a notebook, these functions are available and need not ...
11
votes
2answers
577 views

FiniteFields package is very slow. Any fast substitute for Mathematica?

I want to compute the inverse of matrix, say with dimensions $100 \times 100$, defined over a large finite field extension such as $GF(2^{120})$. I am using the package FiniteFields, but Mathematica's ...
11
votes
2answers
1k views

How to unload automatically loaded packages?

I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of ...
11
votes
2answers
217 views

Globally loading packages while using a CellGroup as the default context

I have a notebook I wish to set up where the sections are conceptually related to each other. But, I wish to isolate them from each other programmatically, so that they do not interfere with one ...
11
votes
1answer
182 views

Predictive code completion and custom functions in contexts

Suppose I work for organisation PQR, and have been developing a suite of packages, PQRUtilities, PQRVisualization etc, all of ...
11
votes
2answers
1k views

Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
11
votes
2answers
126 views

Package automated way of ReadProtecting all symbols

My template for building packages has, at the end, the following expression that automatically ReadProtects all symbols defined in my ...
11
votes
2answers
2k views

Game theory packages

Is there any game theory package around? I mean supporting functions which take a game in matrix form and tell you all about nash equilibra, best strategies, ect
11
votes
1answer
538 views

Where to download the MathWorld package?

I was trying to run some notebook I downloaded from MathWorld, but lots of them need << MathWorld`Curves` I tried to google it , only to find this, but ...
11
votes
1answer
104 views

When is the output of examples in function documentation rasterized?

Upon building documentation in Workbench, Workbench sometimes converts the output of examples on function pages into rasterized images, and sometimes not. Does anybody know what controls this ...
11
votes
1answer
1k views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
10
votes
2answers
277 views

How to abbreviate context names?

It's convenient to abbreviate often-used function names, eg Dim = Dimension. Is it possible to abbreviate long context symbols, e.g. Combinatorica when the context ...
10
votes
1answer
901 views

How to work with Application Project files in Wolfram Workbench?

I have figured out that in a basic project I simply have to call the main package (m file) from the notebook using <<nameofmfile` and then the notebook ...
10
votes
1answer
248 views

MaTeX for Mathematica 9

There's a great package called MaTeX that @Szabolcs wrote which allows one to easily use LaTeX within Mathematica for things like axes labels. After hours trying out various other solutions I ...
10
votes
1answer
156 views

Is there a way to find out who is importing a package?

After calling some functions, if I look into $ContextPath, I can see that JLink` is in there. Is there a way to find out what ...
10
votes
1answer
298 views

Preserving indentation when creating a new line (when editing in a package)

Background: This is the third question in a row of questions about how to make editing packages in the front-end much more bearable (the other two are here and here). It seems that the front end is ...
10
votes
1answer
202 views

Future-proofing access to packed array tools

Most of the Mathematica users beyond beginner level will be aware of the phenomenon of Packed Arrays. The user-accessible functions related to packed arrays live in the ...
9
votes
2answers
3k views

Two x-axis with different units connected by function using CustomTicks

I am trying to make a plot of some photoluminescence data, where wavelength is on the x-axis, and intensity is on the y-axis. Also, I would like to have the graph boxed, with the upper x-axis having ...
9
votes
2answers
705 views

Why is JLink loaded every time I start Mathematica?

When I start a Mathematica 8 session (either command line or with the notebook front end), I notice that there are several packages that have already been loaded for me (using ...
9
votes
2answers
183 views

How to define UpValues in a different context from within a package

I'm trying to create a function (in a package) to import a lot of data and create a symbol with UpValues to return specific results about the data. I've got it working fine in a regular notebook, but ...
9
votes
3answers
741 views

Can't load LevelScheme package

I am trying to use Mark Caprio's LevelScheme package for customizing graphics, but I haven't been able to get Mathematica to load the package using Get or ...
9
votes
1answer
3k views

How do I create and use Mathematica packages?

I have created a package following the tutorial in Mathematica 8 virtual book. However this tutorial is quite, let's call it, "short". I have a TestPackage.m file: ...
9
votes
2answers
167 views

Inconsistent behavior of undocumented Encode->Import->StringToStream->Get on password-locked stream

Let's save a definition. Encode it with password/key and Get it again. We will not use Get ...
9
votes
2answers
332 views

Problem with PlayerPro recognizing a proprietary package

This question follows on from my earlier question Can Wolfram's Player Pro Use Proprietary Packages. That question appeared to have established that, yes, PlayerPro can use proprietary packages. ...
9
votes
1answer
483 views

Mathematica File Organization

Last year I asked how to integrate notebooks to the documentation center in stackoverflow. Back then I was only interested in seeing those notebook and being able to search for them. Unfortunately, it ...
8
votes
3answers
1k views

How do I create a package from an existing notebook?

I have a notebook containing some functions, for example: f[x_] := 2*x g[x_] := x^2 Now I would like to convert this notebook to a package, ...
8
votes
3answers
215 views

How to define a package without adding it to $ContextPath

How can you introduce a package, so that it is listed in $Packages, without adding it to $ContextPath? Note that this question ...
8
votes
2answers
235 views

How to unprotect a variable in a package

In Mathematica 9, I had the function(s). I apologize for the weak formatting. ...
8
votes
3answers
430 views

How to protect functions in a Mathematica Package?

I'm writing a Mathematica Package with many functions, but only two can be seen/public. I have: ...
8
votes
4answers
1k views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
8
votes
3answers
620 views

How can I make private functions inside packages

I want to make private functions.for that purpose,I wrote the following code. BeginPackage["Test1`"] Begin["`Private`"] function1[x_]:=x End[] EndPackage[] I ...
8
votes
2answers
194 views

Is there a way to revert to the built-in function after overwritting it using Unprotect

When using Unprotect, we can overwrite a functions definition: Unprotect[Sqrt] Sqrt[x_]="blahblah" Protect[Sqrt] Once this is done, can we revert to the built-in ...
8
votes
1answer
127 views

What's the goal of the Macros` package?

I see in the Mathematica install a Macros` package. In windows the paths is for example: ...
8
votes
1answer
299 views

Lie algebras packages (with E6, F4 & alii … included)

I am looking for an add-on that deals seriously with computations inside exceptional Lie algebras (and obviously classical ones ...): I want at least all standard basic data concerning them & ...
8
votes
1answer
371 views

How to provide your own example data for a custom package?

A nice feature of the mathematica documentation is the copious use of ExampleData in illustrating functionality. I would like to provide some example data for a ...
8
votes
1answer
128 views

$InputFileName backwards compatibility

What would be a good replacement for $InputFileName (which has been added recently to Mathematica 8) to achieve backwards compatibility with let's say M6 and M7? I ...
8
votes
2answers
108 views

Coding practice Notebooks vs. Packages: ClearAll?

I have a pretty robust workflow for developing in Notebooks. One element of that workflow is the reflexive habit of saying ClearAll just before a definition so ...
8
votes
1answer
142 views

How to sort the functions in a Package?

Once a Package like abc` has been installed, we can use "?abc`*" to scan all the functions defined in this Package. Now I ...
8
votes
1answer
427 views

Looking for a package regarding Schur Polynomials and Kostka numbers

I'm currently looking for any Mathematica package that involves Schur polynomials and/or Kostka numbers. More generally, I'd be happy with anything that expands on symmetric polynomials in general. ...
8
votes
2answers
143 views

Attaching the same message to several symbols

It is common in many packages, as well as system symbols, that the same message can be issued by several functions. Here's an example: One mechanism that can be used for this is to define the ...
8
votes
1answer
628 views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
8
votes
1answer
174 views

FindSelectedFunction for packages - how to make it work?

The Mathematica help menu contains an entry Find Selected Function (Cmd+Shift+F on OSX). If you are working with say Transpose and want to look up its reference ...
8
votes
1answer
796 views

How can I get Mathematica to recognize the documentation for a newly installed package?

To install a new package on one's machine, one first downloads and unpacks the package into the $BaseDirectory/Applications directory. The tutorial Installing ...
8
votes
1answer
1k views

FeynRules vs FeynCalc (or anything else?)

I was looking for a Mathematica package that can take Lagrangians and calculate Feynman diagrams for any given n-point function. (..like if a software can draw and calculate arbitrary loop corrections ...
8
votes
1answer
116 views

Maximum number of literal values for SetDelayed?

Under what circumstances should I expect Mathematica to turn a delayed assignment into an immediate assignment? I have put together a minimal example (available here) which demonstrates this behavior. ...
7
votes
1answer
2k views

How to execute a function in the package from java?

I use Wolfram Workbench 2.0. I can get a KernelLink object and evaluate some simple expressions like "2+2". But I don't know how to export a package and execute ...
7
votes
2answers
128 views

Inserting symbols' definitions during read time of the code

Let's say we've got a package: ...
7
votes
1answer
169 views

Importing parts of Packages

Some programming languages offer the possibility of importing a single function from a library, as in from x import y I'm looking to import only one function ...
7
votes
1answer
212 views

What is the purpose of Dump contexts?

Motivation I've been trolling through some internal code, trying to glean design practices WRI developers employ when extending Mathematica using top-level code. During my ...
6
votes
3answers
427 views

How to properly remove the CUDAResources paclet?

I have Mathematica 8.0.0.0 installed on my Mac, and while I tried to see what it could do with CUDA, it downloaded a large directory (~1 GB) named ...