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)

10
votes
1answer
701 views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
9
votes
1answer
672 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 ...
9
votes
2answers
2k 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
742 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[], ...
9
votes
1answer
104 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 ...
9
votes
1answer
173 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
280 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
225 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 ...
9
votes
1answer
235 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 ...
9
votes
1answer
451 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 ...
9
votes
0answers
40 views

$Path hijacked by PacletManager?

Summary: Since Mathematica version 6, the PacletManager seems to have engineered an escalating hijack of the $Path variable. Add-on packages need to have a ...
9
votes
0answers
136 views

Can code optimize code?

Are there functions, programs or packages that deal with optimizing mathematica code i.e. re-writing ineffecive or convoluted code. -This question has haunted me since I joined SE. The background for ...
8
votes
2answers
118 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
320 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
778 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
2answers
614 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 ...
8
votes
1answer
2k 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: ...
8
votes
1answer
297 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
113 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
1answer
465 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
161 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
887 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 ...
7
votes
3answers
178 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 ...
7
votes
2answers
152 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 ...
7
votes
1answer
1k 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
1answer
199 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 & ...
7
votes
1answer
121 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
100 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 ...
7
votes
1answer
484 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 ...
7
votes
1answer
187 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 ...
7
votes
0answers
67 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. ...
6
votes
3answers
341 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, ...
6
votes
3answers
371 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 ...
6
votes
2answers
2k views

Function to compute the probability of exactly one event occurring out of N independent events

Is there a built in function (or a function in one of the standard packages) that allows you to compute the probability of exactly one event occurring out of some known set of probabilities for N ...
6
votes
3answers
349 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 ...
6
votes
1answer
100 views

How to suppress automatically generated header in packages?

At the top of the .m file which is automatically generated from initialization cells in a notebook there appears a header: ...
6
votes
1answer
179 views

On Reverting Code that Mma Switches to Raw Input Form Back to Standard Form

I experienced a similar issue to what is described in this post while editing formatted usage messages (that contained italics) in the declaration section of a package that I'm developing in the ...
6
votes
1answer
151 views

Could a package be composed of references?

Could a package be composed of references (e.g. usage messages)? Do the code for an induvidual function implemented in a package has to be physically in that package file where it is referenced (i.e. ...
6
votes
1answer
215 views

Summa package problem

I need to use the features of the Summa package but it doesn't work in Mathematica 9. It gives the error Cannot open Utilities`FilterOptions` My question is: ...
6
votes
2answers
1k 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
6
votes
1answer
240 views

How get Singular.m package to interact with Singular itself?

I've installed the package Singular.m by Kauers and Levandovskyy from http://www.risc.uni-linz.ac.at/research/combinat/software/Singular/ as well as the Singular ...
6
votes
1answer
97 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 ...
6
votes
2answers
168 views

Load Mathematica packages from the network

Is it possible to load packages (.m) directly from the network (http, https) without installing it locally?
6
votes
2answers
158 views

Is Package development (via InitializationCells) compatible with creating new Notations (via MakeExpressions)?

Can new (lower-level) notations be readily used within package code? There are a few notational additions that might improve my code base but I'm not sure if these will end up being more trouble than ...
6
votes
1answer
324 views

Support for Multidimensional Scaling (MDS)?

Does mathematica support MDS? Or, are there any libraries that support it? Basically, I have points and a distance function defined between them, and I want to plot them in 2D space, trying to ...
6
votes
0answers
90 views

Automatization of SyntaxInformation and argx?

Does anybody have a good way to automate the setting of SyntaxInformation for any custom function? I have a ton of functions for which I want to set SyntaxInformation, and doing it by hand seems a ...
5
votes
3answers
441 views

Can't load LevelScheme package

My problem is that I can not load the LevelScheme Package. I am using Mathematica 8. I downloaded and unzipped the folder from this website. I saved it in the ...
5
votes
1answer
1k views

FeynArts not working properly

So I have installed all FeynArts folders (from 3.5 to 3.7) with FeynCalc 8.0.1., and none of it is working properly :\ First I load the path to specific FeynArts package (3.5 for instance), then, by: ...
5
votes
1answer
135 views

Reloading package after accidental Remove[] of symbol

I was using Needs["PlotLegends"] By chance I removed ShowLegend by Remove[ShowLegend] How do ...
5
votes
2answers
153 views

Loading custom notation on startup without showing the Notation palette

I was creating some custom notations using the Notation package and it works fine. I put it in my default personal package, and it loads fine on Mathematica's startup. To make it complete I need just ...