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
252 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
157 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
86 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...
2
votes
1answer
181 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
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
88 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
103 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: ...
9
votes
1answer
351 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
152 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
61 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
31 views

How to use PageBreakPalette?

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

Odd behavior of FindFile

Running FindFile gives some odd results on my machine: FindFile["HTTPClient`"] Result: ...
1
vote
0answers
97 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 "...
26
votes
1answer
526 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 ...
1
vote
1answer
196 views

ExcelLink: “Choose a Mathlink program to launch” after upgrading from 10.0.2 to 10.1

After upgrading to 10.1, I now get a prompt "Choose a Mathlink program to launch" when I call code that uses ExcelLink. This code worked prior to the update. I am wondering if this is a ...
0
votes
1answer
76 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. ...
2
votes
2answers
108 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 ...
1
vote
0answers
63 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 ...
4
votes
0answers
51 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: <...
15
votes
1answer
548 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 ...
-1
votes
1answer
120 views

Time series package in Mathematica 9 [closed]

Is the time series package already installed in Mathematica 9? I have already installed Mathematica. Do I need to install the time series package? If so, from where? or should i go for Mathematica ...
4
votes
1answer
215 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 ...
15
votes
1answer
305 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 ...
5
votes
2answers
319 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 ...
3
votes
0answers
109 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 ...
4
votes
0answers
69 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
61 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 ...
1
vote
1answer
61 views

Package Function Confusion

I am a freshman working with Mathematica. I have written a package with a function like this: ...
1
vote
0answers
111 views

Mathpsfrag: failed setup at MathPSfragConfigurationTest (UnPSfrag) line (Windows 8)

I'm trying to follow the documentation on how to get mathpsfrag set up on Windows 8 (64-bit). It failed at the line ...
1
vote
1answer
179 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: ...
3
votes
1answer
115 views

Using packages with symbols that have the same name

Let us suppose we have two packages: A and B. ...
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
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 ...
1
vote
1answer
66 views

Simplifying a product with indices by implementing a rule

I want to simplify a product of two operators including indices. Let's say my operators are $$ \mathcal{O}^{\mu \nu, \alpha \beta} = -p^2 \left( \eta^{\mu \alpha}\eta^{\nu \beta} + \eta^{\mu \beta} \...
0
votes
0answers
98 views

Graphics Plotfield

A number of older books use the command: <<Graphics`PlotField` But Mathematica 10.0.2 says it cannot find it. Now, I know ...
5
votes
2answers
90 views

Annotation specifier like :Author: and sectioning like ::Section:: in package code

In packages, there is a special way to make basic formatting and annotation within normal comments. Here is another question related to annotation. Package file headers usually contain information ...
9
votes
2answers
208 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 ...
1
vote
0answers
56 views

Mysterious message posted when I move the cursor in a custom function

I wrote a function called CPlot for complex plotting which is supposed to act a lot like Plot in its input format, but ever ...
13
votes
1answer
306 views

How to use Get on a folder

In the documentation for Get it says: If the file found by <<name is a directory, the Wolfram Language will try to ...
1
vote
0answers
82 views

Autoloading attempting to follow Roman Maeder's master package instructions

I am trying to use the Master Packages discussion from "Programming in Mathematica" by Roman Maeder. I have a directory: D:\at_work\mathematica\JacksPackages ...
1
vote
1answer
72 views

Using underscore in directory names and loading packages

Using an underscore with the SetDirectory command works fine. SetDirectory["D:\\at_work\\mathematica\\programming_maeder"] Now I can load a package using Get["...
3
votes
1answer
110 views

Package and imbricated compiled functions

I would like to build up a Mathematica package Pck which contains compiled functions. However when loading this library I obtain an error. When reduced to a minimal ...
4
votes
2answers
128 views

Can I view a package as a regular notebook?

How can I open a package as a normal notebook, i.e. without the toolbars and formatting of the built-in .m file interface.
3
votes
0answers
149 views

Mathematica GUIKit

Does anyone of you know if the GUIKit package is still under some development by Wolfram Research or is the current version 1.1.0 the last one. Does it make sense to make GUIs using this package in ...
1
vote
0answers
54 views

Where can I find documentation for the File->New->Package window?

I'm using 10.0.0 on OS X. When I go File->New->Package a window similar to a notebook appears, but with different coloration and a row of buttons on the top like 'Update' and 'Run Package'. I'm not ...
2
votes
1answer
75 views

How can I prevent a package from loading into a notebook run from Workbench?

I have a Workbench project in which I have created two packages: PackageA.m and PackageB.m. In the same project, there is a ...
0
votes
0answers
43 views

Can't Load .rst file [closed]

I've been working with the FeynRules 2.1 package in Mathematica 10. If I download the MC4BSM_2012 FeynRules files and run the Mathematica Notebook I've got no problem in Ubuntu (A lot of warnings ...