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)

8
votes
2answers
109 views

Why a function returns two different values if copied into a Notebook or imported with Get from a Wolfram Mathematica Package?

I have some Mathematica code that shows a behaviour I really cannot understand. The code only contains a bunch of function definitions. If I paste it in the Notebook Front End and I evaluate it, I ...
8
votes
2answers
211 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
133 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
151 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
578 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
1answer
802 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
176 views

SciDraw error loading package

I am running Ma 10.3. When I try to Get SciDraw package I get the following error: ...
8
votes
1answer
181 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
2answers
4k views

Command line execution of Mathematica notebooks and conversion to .m

Sometimes one may want to execute a notebook via the command line (for example to run it remotely). As far as I know it's not possible to run notebooks directly, but ...
8
votes
1answer
985 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
118 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
2answers
1k views

Time-frequency analysis beyond wavelets

What possibilities are there for time-frequency analysis in Mathematica beyond wavelet decomposition? I could not even find a simple STFT.
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
446 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: ...
7
votes
1answer
136 views

How to use the Autoload directory?

According to the documentation, packages in $UserBaseDirectory/Autoload will load automatically on startup. I placed an .m file ...
7
votes
2answers
139 views

Inserting symbols' definitions during read time of the code

Let's say we've got a package: ...
7
votes
1answer
225 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
2answers
996 views

Perturbation theory in general relativity using xAct

I'm trying to use the xAct Mathematica package for manipulating tensors, and I'd like to plug in a metric into the perturbation equations to first order in general relativity, and have everything ...
7
votes
1answer
96 views

Non-commutative algebra (NCAlgebra): How to properly SetCommutingOperators

I am starting to work with non-commutative algebra in Mathematica and had a look at the NCAlgebra package. I installed it and can use its functions. However, what I am struggling with is the ...
7
votes
1answer
42 views

How to ensure that a package is always loaded on startup, even in parallel kernels?

Is there a robust way to ensure that a package is always loaded on startup, even in parallel kernels? Parallel kernels do not read Kernel/init.m.
7
votes
1answer
92 views

Recommendations about modifying usage of built-in symbols

In my package, I use some of the built-in Mathematica symbols in non-canonical ways. Right now, I use them as Options or ...
7
votes
1answer
192 views

Show StyleSheets and Palettes from custom directory in Mathematica's Menu

I'm working on a package that needs to be installed into an arbitrary, "non standard" path (i.e., not $BaseDirectory or ...
7
votes
0answers
85 views

Mathematica package for explicit matrix representations of group generators?

While there are several packages that are capable of working with weights and roots (for example LieArt), I couldn't find any package that spits out explicit matrices for the generators, for example ...
6
votes
3answers
477 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
1answer
122 views

What is the reason that $zz^*$ is not written as $ |z|^2$ sometimes?

For a general (complex) number $z$ I sometimes get terms that explicitly writes (for instance) $$2zz^*+|z|^2. $$ I should add that these expressions come from long calculations involving packages (...
6
votes
1answer
2k 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: ...
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
1answer
126 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
284 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
160 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
2answers
160 views

Does the operating system matter when using Encode[]?

I have a package I want to distribute. I wrote the package in Version 9 under a Mac OS X operating system. I want to Encode[] the package. The end user will ...
6
votes
1answer
382 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
162 views

Import another Notebook as if it were a Package

Is it possible to import the contents of another (existing) notebook into the current namespace in the same way that I can with a package? I know that it would be best to use a ...
6
votes
1answer
99 views

How to delay the definition of a function from the time of package initialization to when it is first called

I am writing a package where a couple defined functions take a very long time define at initialization time (because they are large CompiledFunctions). However ...
6
votes
1answer
168 views

Loading Packages with Parameters

I have some packages that uses database connections inside it, let's call it ConnPackage. The connection IP is a public package variable, and has a default value: <...
6
votes
1answer
88 views

Where are examples of packages that are locked?

I wanted to see some packaged whose core functions are locked, but I couldn't find any. Is anyone protecting their code with the Locked and ...
6
votes
2answers
96 views

How to store symbols in a package without being parsed?

I have a package file myPackage.m with the following content: BeginPackage["myPackage`"]; load[] := {a, b, c}; EndPackage[]; ...
6
votes
1answer
247 views

Installing packages on “Mathematica Online”

How can I install packages in Mathematica Online? In particular, how can I install the xAct package?
6
votes
2answers
83 views

SetSystemOptions in a package

I'm looking to update a large package (with subpackage files called in the same context) to be compatible with version 10. A lot of the functionality surrounds plotting, particularly some custom ...
6
votes
2answers
403 views

Package relative file path specification

I have some packages inside a folder (named Packs) that is in the same file level of some executed package. ...
6
votes
2answers
497 views

Coordinate free differential forms package

I am looking for a package in Mathematica which can handle differential forms in a coordinate free manner. I am aware of several packages which do differential forms, but it seems that for all of them ...
6
votes
2answers
214 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
206 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
407 views

Installing R packages using RLink on Mac OS X

Is there any updates regarding installing CRAN packages via RLink in Mathematica 10 on Mac OS X? Or are we still stuck with the base R package and that's it? I was able to point to my R distribution ...
6
votes
1answer
209 views

Does new MMA9 Time Series support obsolete the old TimeSeries Package?

MMA9 includes a fair number of functions and symbols that seem to overlap with the old TimeSeries package. The new features are documented here and the old material is documented here. Some of the ...
6
votes
2answers
283 views

How do I correctly embed VerificationTests in my packages?

I like to write my tests before I code and write them inline when developing a package, and when loading a package those VerificationTests should run and the load should fail and print a report if ...
6
votes
1answer
502 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
154 views

Where is f2mma.zip, Fortran to Mathematica converter?

I want to convert the SOFA libraries to Mathematica, and found out about f2mma, a Fortran to Mathematica converter. Google points to many papers about f2mma, but the only link to the software ...
6
votes
0answers
91 views

Does one need to be careful about loading multiple (many) contexts or packages in the same session?

I have a number of large pieces of precomputed data which I am considering putting into individual packages in order to load them (via DeclarePackage) and unload ...
6
votes
0answers
132 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 ...