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)

3
votes
0answers
35 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: ...
0
votes
0answers
18 views

CoordinateBoundsArray? [on hold]

I want to use CoordinateBoundsArray but Mathematica does not recognise it. Is it a specific package that I need to explicit include, or is this just due to my ...
5
votes
1answer
94 views

Working example for the built-in SavitzkyGolayMatrix for doing polynominal smoothing

Have been using various packages SavitskyGolay.m for Savitsky-Golay polynomial smoothing but just noticed the built-in matrix kernel. I am looking for an example ...
12
votes
2answers
255 views

Is there a bug in AssociatePairs?

Bug introduced in 10.0 and fixed in 10.1.0 In Version 10, the GeneralUtilities package contain some useful functions. ...
0
votes
1answer
83 views

Traces of products of Gell-Mann matrices in FeynCalc

I am working on an assignment in FeynCalc and I need to evaluate traces of products of two commutators of Gell-Mann (SU(3)) matrices, i.e. I need to calculate the ...
0
votes
0answers
75 views

Problem with loading a package [closed]

I am very new to Mathematica and managed to confuse myself completely while trying to import a package. I am supposed to use a package that I did not code myself (it definitely works though). I ...
6
votes
1answer
80 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 ...
19
votes
3answers
707 views

How to program a F::argx message?

How useful is it to program a user-built function in a package to produce a red warning message F::argx if you give the wrong number of arguments to that function? ...
3
votes
0answers
93 views

Are there any build-in or third-party packages for general topology or algebraic topology in Mathematica?

I am learning general topology (wiki) and algebraic topology (wiki). Are there any build-in or third-party packages for general topology or algebraic topology in Mathematica? Through googling, ...
4
votes
1answer
139 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
46 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 ~/Library/Mathematica. It's been suggested that I should change this, and then add my own ...
2
votes
1answer
56 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
19 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
27 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
71 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
86 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: ...
4
votes
1answer
183 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
96 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: ...
29
votes
1answer
720 views

Proving the hairy ball theorem using xAct

I would like to formally prove the hairy ball theorem in Mathematica, initially just for $S^2$, and then see about generalizing. An approach I thought about to use the xAct package to define $S^2$ ...
5
votes
0answers
88 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
100 views

AutoGeneratedPackage Formatting

If you do Ctrl+Shift+o you open an option inspector. And then you can enable ...
2
votes
2answers
83 views

Partial reload of definitions from package

In order to keep my code modular, I have defined some functions in "Foo.wl" file, which I source with Needs["Foo`"]. When I modify a single function in Foo, I quit ...
17
votes
0answers
226 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 ...
2
votes
1answer
48 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
75 views

EquationTrekker PropertyValue errors

In Mathematica 10.0.2, the basic example for EquationTrekker in the documentation is: ...
8
votes
1answer
117 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
37 views

Odd behavior of FindFile

Running FindFile gives some odd results on my machine: FindFile["HTTPClient`"] Result: ...
16
votes
1answer
253 views

In 10.1.0 BenchmarkPlot doesn't work?

In Mathematica 10.1.0 BenchmarkPlot from the GeneralUtilities package doesn't work; copying Taliesin Beynon's initial use of the function on this site: ...
0
votes
0answers
50 views

Calling a custom function in slave kernel process connected through mathlink

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 ...
1
vote
1answer
55 views

Package Function Confusion

I am a freshman working with Mathematica. I have written a package with a function like this: ...
4
votes
1answer
135 views

Where do I find the ODE.m package of the Book “Scientific Computing with Mathematica®” by Marasco and Romano?

I downloaded this book at SpringerLink. It should contain a CD-ROM with notebook-files (i.e. ODE.m) but there is no download available. Particularly I am interested in a Mathematica package which ...
8
votes
1answer
213 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 ...
0
votes
1answer
44 views

How can I use private variables in different ways

How can I use some private variables/symbols in another sub contexts in different ways. Note: Please do not use code Cell Style for testing the codes. ...
0
votes
0answers
33 views

Debug package with command line arguments

I'm creating a package that takes as arguments input from the command line using $ScriptCommandLine. What's unclear to me is how to best debug this package. How do others perform these tasks? I ...
0
votes
0answers
33 views

How to implement time dependence in the DoFun package?

DoFun is a very usefull mathematica package that helps to write Dyson-Schwinger and FRG flow equations when these are to complex to write down by hand. You can download it here and read it's manual ...
15
votes
4answers
319 views

Result about Context is inconsistent with the description of “Power Programming with Mathematica”

x = 5; temp`x = 6; Begin["temp`"] {x, Global`x, temp`x} The result in my Mathematica session is {5,5,6}, but it's ...
4
votes
0answers
45 views

Wrong autogenerated package from notebook containing #key and Part as subscript

Bug introduced in 10.0.0 and persisting through 10.1.0 or later Mathematica v10.1.0, under Windows 8.1 x64 Mathematica v10.0.2, under Windows 1) Define a function in an initialization cell: ...
0
votes
0answers
54 views

Atlas 2 For Mathematica. Need to calculate Riemann tensor, etc [duplicate]

Is anyone familiar with Atlas 2 for Mathematica to calculate the Riemann Tensor, Ricci Tensor, and scalar I have a metric that I need to calculate these things for. Can anyone help? I'm not too up on ...
0
votes
0answers
42 views

What is the right way to combine a Package, Module, ParallelTable and NIntegrate?

I am stuck with a curious problem. I would like to to have a package from which i can call a function test[path], which then performs a time consuming numerical ...
8
votes
1answer
115 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. ...
5
votes
2answers
161 views

Package Loading: How to get rid of Needs::nocont?

I am trying to create a documentated application inside FileNameJoin[{$UserBaseDirectory, "Applications"}] I obviously dont fully understand the concept of the ...
13
votes
1answer
166 views

How to get the directory of a package?

I have a package that I have placed in the $BaseDirectory\Applications directory so that Needs can find it. I have a logo in ...
3
votes
1answer
237 views

Package autoloading not working in CDF and Player Pro

I have made a package BeginPackage["top`"] t[x_]:=MessageDialog["This is top"] t1[x_]:=MessageDialog["This is top1"] EndPackage[] and used the code of this ...
6
votes
2answers
67 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 ...
4
votes
0answers
63 views

Variable not assigned to correct Context [duplicate]

I am trying to understand Mathematica's Context, but I do not understand why the short name of the variable defined in the temp` context (x) returns the Global definition. I am following the section ...
0
votes
0answers
30 views

Automatic AutoIndent while editing a Package (.wl)

The author of this question is interested to personally handle the code indentation and have the package editor, built-in in Mathematica 2012, preserve the manually chosen indentation level from line ...
0
votes
0answers
107 views

Using Quantum Mathematica package with V10

I am using Quantum Mathematica add on/package for my calculations. It works well with Mathematica 9 and below. But when i run it on Mathematica 10 it gives problem/error. When I run the initial ...
6
votes
2answers
260 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 ...
11
votes
2answers
125 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 ...
1
vote
1answer
82 views

Load a package and use it's functionality inside C#

I am trying to make a windows C# form which uses some functions that I wrote inside Mathematica. Suppose that we have the following package: ...