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)

23
votes
0answers
353 views

What is the difference between a .wl package and a .m package?

In Mathematica 10.x, one now has both .wl Wolfram Language Packages and .m Wolfram Mathematica Packages. What's the ...
2
votes
1answer
92 views

Why must I specify the Global context for a symbol in a private package?

I have written two versions of the function below in a package. When I load the package and call the function, Why does the first version where the variable s has no explicit Context return the long ...
1
vote
0answers
65 views

Installing feynarts diag [closed]

I'm trying to install this package: http://www.feynarts.de/diag/, I followed the instruction entering ./configure make make install but when I type ...
0
votes
1answer
78 views

Loading Level Scheme error [duplicate]

I am new to Mathematica. When I am using: Get["LevelScheme`"]; it gives the following error: Get::noopen: "-- Message text not found -- ...
4
votes
0answers
66 views

How to write Coordinate Chart in Xcoba in index form?

I am using xCoba for manipulating tensors. I do the usual, defining my metric, manifold, chart etc. ...
3
votes
0answers
89 views

Schwarz-Christoffel toolbox [closed]

Is there a toolbox for working with Schwarz-Christoffel transformations in Mathematica? More generally, is there a toolbox for visualizing conformal mappings in the complex plane? There are a lot of ...
0
votes
1answer
55 views

Error message Graphics`Colors`

I am having trouble running this code: ...
1
vote
0answers
58 views

Fail to Create a package [closed]

This is rather basic. In an empty notebook I type in a single cell ...
6
votes
1answer
93 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 ...
5
votes
2answers
240 views

Evaluate notebook from other notebook

I have a notebook ("notebook 1") which in the beginning sets some parameters, does something depending on their value and saves the result to a file, say: ...
1
vote
0answers
52 views

Running a script that needs a package

I am running a resource extensive notebook, and so I am trying to break it down into a .m file so that I can run it quicker and without using the mathematica interface. The problem is that my notebook ...
2
votes
1answer
74 views

What is the Java converter?

I notice that there is a directory: C:\Program Files\Wolfram Research\Mathematica\10.2\SystemFiles\Converters\Java. What is this? I could not find any documentation ...
4
votes
1answer
169 views

EquationTrekker using Mathematica 10.2

I wonder whether the problem that arise with the following code is specific to my machine, as it seem to work with the documentation example. ...
1
vote
1answer
54 views

No names when loading package [closed]

I want to use mu own package. This is the procedure I take: 1) In Mathematica notebook I put the following code taken from code ...
4
votes
1answer
115 views

Change Notebook's Default Context

In my workflow, when testing/developing packages, It's an common situation to test internal packages functions that has been already loaded with the package, so they are in the ...
4
votes
1answer
118 views

How can I temporarily suspend the Combinatorica package?

Sometimes after I load the Combinatorica package by entering Needs["Combinatorica`"], I need to use Mathematica for something like: ...
4
votes
1answer
106 views

User defined packages don't load with $\mathtt{Needs}$ or $\mathtt{Get}$

As an introduction to packages in Mathematica I'm following this short guide by Leonid Shifrin, and tried using the sample package provided in that answer. However, both ...
1
vote
1answer
48 views

How to reference StringExpression named parts from a package without full Context path?

I have a long StringExpression in a package returned by a function. There are some named parts in the expression that I would like to reference when I use the ...
1
vote
1answer
102 views
0
votes
1answer
47 views

Transforming the x-axis of a figure created with customticks package [duplicate]

I have some data which i inter alia define and invert ...
3
votes
1answer
69 views

How to use special characters in .m file?

I ran into a strange problem with a function that I want to include in a package file (.m): Cleanup[data_] := data /. (\[Placeholder] -> Missing[]) When I ...
5
votes
2answers
95 views

Strange behaviour of order of execution or bug?

In[1] and In[3] are identical but the output is different.
6
votes
1answer
204 views

Installing packages on “Mathematica Online”

How can I install packages in Mathematica Online? In particular, how can I install the xAct package?
3
votes
0answers
36 views

Context is not clearable and does not reload [closed]

I'm just going crazy with Mathematica Contexts as they absolute do not work as intended. Simple Example: Begin["TEST`"] Hello[s_]:=s Bye[s_]:=s End[] Now using ...
6
votes
0answers
75 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 ...
2
votes
1answer
187 views

Saving file as .m causes it to save as comments

I am attempting to create a Package and so am saving a notebook with the code from Mathematica's example ...
1
vote
1answer
63 views

Differentiation inside package

I am trying to put all my functions in a single package and some of them do not work because of differentiation. Suppose I have the following package ...
7
votes
2answers
139 views

Inserting symbols' definitions during read time of the code

Let's say we've got a package: ...
9
votes
2answers
125 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 ...
4
votes
2answers
149 views

Use of Ito's lemma in ItosLemma.m (or any other method in Mathematica)

This is a follow-up question on this question: Use of Ito's lemma in ItoProcess My problem is to find some method how to use Ito's lemma in Mathematica. As an example: How can I apply Ito's ...
1
vote
0answers
51 views

Sum of zeros in finite Galois field

In the following code: << FiniteFields` GF[2][{0}] + GF[2][{0}] == GF[2][{0}] GF[2][{0}] + GF[2][{0}] + GF[2][{0}] == GF[2][{0}] Why does the second line ...
4
votes
1answer
137 views

What is the difference between Update, Run Package, Save and Install for packages?

I am building a package, using Mathematica 10.0.2.0. I notice in the displayed window for the package there are buttons labeled Update and Run Package; on the File menu, there is an item for Save; ...
11
votes
1answer
220 views

How can I include functions from a package into a CDF file?

I am building an application which I would like to deploy as a CDF file, and I am struggling to make the CDF exports work correctly with functions pulled from a .m package file. What are good/best ...
3
votes
0answers
38 views

Cross referencing symbols in different packages [duplicate]

I have problems with name space shadowing which I do not know how to resolve. I have two packages which depend on each other. Here is example of two files fooPackage.m: ...
4
votes
1answer
153 views

Can I do constraint programming in Mathematica? [closed]

I would like to know if there is a way to do constraint programming in Mathematica? I think there are no built-in functions, but maybe some of you know some additional packages addressed to the ...
0
votes
0answers
85 views

Setting UserBaseDirectory for custom packages

Is there any reason to set $UserBaseDirectory to be anything other than the default? On my mac its set as ...
2
votes
1answer
152 views

Needs cannot open a package

I have a package and notebook in the same directory, but Needs is throwing an error "Cannot open EField.m". I have tried several variations of this. I am ...
0
votes
0answers
22 views

How to protect variables or functions only for outside? [duplicate]

I have some private variables within my package. Begin['Test`']; Begin[`Private`]; var = 0; f[x_]:=(var = x); End[]; EndPackage[]; When I execute some functions ...
0
votes
0answers
29 views

How can I avoid to define public all methods in a package [duplicate]

If I have to code a Package and these package use a lot of functions and variables. In spite of, using in every call of function or variable with namePackage ...
5
votes
1answer
86 views

Shadowing of optional function arguments?

I am trying to define two different packages that process some information in a different way. These packages have functions into them with optional arguments. The names of the optional arguments ...
5
votes
1answer
102 views

Naming conflicts with Dummy variables in several packages conflicts

I'm using several packages in a notebook. In each packages there is functions defined with dummy variables. When I load the several packages in my session, i've got a warning message: ...
7
votes
1answer
289 views

Possible Bug of loading Package @ Mathematica 10.1

When I open mathematica, there will pop-up some messages where << package` is in the following file ...
0
votes
1answer
118 views

Solve seems broken after I installed the package Tomatlab.m

After I downloaded the Mathematica package ToMatlab.m, Solve does not work as before: ...
6
votes
0answers
142 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 ...
2
votes
1answer
60 views

Missing definition of some parts of function?

I have: BeginPackage["Test1`"]; ClearAll[f]; f::usage = ""; Begin["`Private`"]; f[x_AA]:= 1; f[x_BB]:= 2; End[]; EndPackage[]; When later, on a notebook, after ...
0
votes
0answers
30 views

How to use PageBreakPalette?

I would like to use PageBreakPallete from http://library.wolfram.com/infocenter/TechNotes/4094/ I did ...
10
votes
1answer
186 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: ...
4
votes
0answers
46 views

Odd behavior of FindFile

Running FindFile gives some odd results on my machine: FindFile["HTTPClient`"] Result: ...
1
vote
0answers
94 views

Calling a custom function in slave kernel process connected through mathlink [closed]

I am performing a small experiment to check if we can call/execute a custom package function in slave kernel launched from master using mathLink. I have created a dummy application called ...
25
votes
1answer
492 views

In 10.1.0 BenchmarkPlot doesn't work?

Bug introduced in 10.1 This bug was resolved in 10.2.0, but another bug was introduced in 10.3.0 persisting through 10.3.1 and finally resolved in 10.4 In Mathematica 10.1.0 and 10.3.0 ...