Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [initialization]

Questions about the usages of the various initialization files used by Mathematica. The most common ones are the init.m files that can be found in some Mathematica system folders and in a few specific user folders.

2
votes
0answers
29 views

Problem with PopupMenu: Its values don't update dynamically

I have a problem with PopupMenu inside DynamicModule, its values don't update dynamically as they supposed to. The example below ...
0
votes
1answer
37 views

Cannot set DownValues to ValueList while loading package

I have installed a package named HEP from Wolfram Library Archive which contains several .m files by Files -> Install (...
6
votes
1answer
126 views

init.m in Autoload directory is not read by parallel kernels in M11.2

Parallel kernels are not reading the init.m files in $UserBaseDirectory/Autoload since version 11.2. The master kernel reads it ...
1
vote
0answers
43 views

How does -preinit work in 11.2?

On Initialization & Provisioning at http://reference.wolfram.com/language/guide/InitializationAndProvisioning.html the WolframScript Command-Line Options mention -preinit and -postinit. I am ...
0
votes
0answers
184 views

Evaluate Initialization cells at startup [duplicate]

How can I start an evaluation of the initialization cells when a notebook is opened? Should I use FrontEndExecute[] in some way?
0
votes
0answers
89 views

Hide initialization cell [duplicate]

I would like to load a package at the beginning of a notebook. So i put these lines inside an initialization cell: ...
4
votes
2answers
179 views

Batch Loading of Mathematica Packages and Issues with Autoloading

I have a package that initiates some periodic tasks via the ScheduledTasks functionality. The tasks in question also require the use of parallel tools and the launching of external commands. ...
1
vote
0answers
128 views

How to *safely* enable automatic initialization cell evaluation for one notebook?

I want to configure this one notebook (let's call it X) so that its initialization cells get automatically evaluated when X is first opened1. To this end, I have applied the settings shown below to ...
15
votes
2answers
594 views

Detecting kernel initialization

Certain operations do not work during kernel initialization. Code from Kernel/init.m, the Autoload directory, or packages set ...
6
votes
1answer
237 views

Register “initialization code” to run on any newly started parallel kernel

Is it possible to register a some "initialization code" to be run on any newly started parallel kernel? This would be similar to how ParallelNeeds registers a ...
3
votes
1answer
94 views

Initializate Manipulate

Hello I am a beginner in Mathematica and I have a question about initialization of manipulate. I have code like this and I want to ask you, how to modify that code if I want have default picture saved ...
0
votes
0answers
593 views

Mathematica won't evaluate on the first run & problem with code highlight

When I start Mathematica, the first evaluation always takes forever even it's as simple as x = 2, and when I halt the evaluation with ...
4
votes
1answer
163 views

Why InitializationCellWarning is False and still I get warnings?

I wrote a notebook containing initialization cells: (1) notebook's options related to initialization are set to: ...
10
votes
1answer
119 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.
2
votes
0answers
67 views

How can I bypass the limitations of init.m? [duplicate]

In a series of QA it has been pointed out that init.m suffers of heavy limitations (see as example, Automatically load packages at startup or Why can't I import ...
5
votes
2answers
201 views

Strange Error with Initialization within Animate

Animate[x, {x, 0, h}, Initialization :> (h = 1)] The code above gives the error: Animate::vsform: Animate argument {x,0,h} does not have the correct form for ...
3
votes
0answers
83 views

What is the appropriate way to handle JVM memory issues in a Mathematica package?

I maintain a large Mathematica package (here) that, for certain operations, calls out to a Java library (here). The details of the libraries are not important, but I've come across a frustration with ...
3
votes
1answer
80 views

Starting notebook from text mode

I am trying to start new notebook from a command line mode with command UsingFrontEnd@CreateDocument[] The notebook is created but it stays in minimized mode at the ...
4
votes
1answer
154 views

How to efficiently split your code in several pieces [duplicate]

I want to efficiently keep my program in several documents, and initialise pieces of it automatically. I'm pretty sure that there is a manual on the subject, but I'm unable to find it on my own. At ...
3
votes
1answer
833 views

Phase space 3D diagram [closed]

I want to draw a diagram for nonlinear dynamic system in three dimensions $(m,y,A)$ but I don't know how do it. These are my equations: ...
1
vote
1answer
62 views

Notation::gshadw warning when using Symbolize inside If

Somewhere in my init.m file I have the following code: ...
4
votes
1answer
74 views

Specifically retrieving all “non-default” option values from the Options Inspector

Recently Mathematica broke on me and I had to reinstall. I lost all of the changes I've made in my Options Inspector over the past year and am attempting to go back and change them again by memory. ...
6
votes
1answer
986 views

Mathematica 10.0.1 freezes at Initializing kernels

I tried to evaluate PacletUpdate["CloudObject"] in WolframKernel.exe, but got the error: PacletInstall::dwnld: An error occurred downloading paclet ...
12
votes
3answers
6k views

Front end freezes on start-up

Update 2015 September 4: An incorrect paclet update was pushed recently that caused Mathematica to not hang on startup with "Initializing kernels". The problem and solution are described here: ...
1
vote
0answers
97 views

auto save a notebook using init.m

I tried to make mathematica autosave as default, so I put Sjoerd C. de Vries's code https://stackoverflow.com/questions/7193804/automatically-saving-notebook-or-other-type-files-in-mathematica-files/...
3
votes
1answer
258 views

Failed to create a special random-disturbed initial condition for partial differential equation [closed]

I try to use BSplineFunction to creat a initial condition for NDSolve which has periodic boundary condition, that is realized by ...
13
votes
1answer
438 views

How to use Get on a folder

Documentation flaw introduced before 9.0 and persisting through V11.0.0 In the documentation for Get it says: If the file found by ...
8
votes
2answers
268 views

Where put or edit an init.m to add menu commands?

In this question, answers were given that worked to add items to some menu commands, e.g., additional colors on the Format > Background Color menu, or Help menu items. I have code for such in an ...
2
votes
2answers
222 views

Why can't I import a file in the init.m file?

I would like to have some data read in every time the kernel starts, but it doesn't seem to work. Say I have a CSV file I want to have read in, for example I use: ...
17
votes
2answers
1k views

What is the right place for user-defined init.m?

What is the right folder to put a file init.m which will be run after all other init.m files applied by the various components of Mathematica have done their job? ...
4
votes
1answer
137 views

Where can I permanently modify Directory[]?

First I set SetDirectory["F:\\learning_mma"];Directory[](*ok,success*) and then I quite the kernel: Quit[] an then ...
0
votes
1answer
66 views

Automatically restoring the state of a prior session [duplicate]

I have the following problem (I guess a very naive one): I work with some data and make a statistical analysis in Mathematica. I do it over several days and each time I open the file, I have to go ...
3
votes
0answers
62 views

$Failed below input area of new cell in notebook [closed]

The Mathematica 9 installation on my laptop has developed an odd feature. Just underneath the grey line indicating the input area for a new cell, the expression ...
6
votes
0answers
372 views

What is the difference between NotebookEvaluate and FrontEndToken

I am wondering what exactly are the differences in using NotebookEvaluate[filename] vs ...
5
votes
0answers
163 views

How to keep $FrontEnd options from resetting?

I'm trying to get Mathematica to look in a different, version-tracked folder for the 'TextResources' files that it uses to build the Front End. I've prepended my version-tracked folder path to the <...
3
votes
1answer
257 views

How to start Mathematica kernel without loading init.m?

Is it possible to start Mathematica kernel from UNIX command line without having the init.m loaded, but not by simply deleting or commenting out it before hand? If this is a Mathematica script, is it ...
4
votes
2answers
210 views

Use URLFetch in init.m

I'm not able to use URLFetch in my $UserBaseDirectory/Kernel/Init.m as it always returns ...
49
votes
3answers
735 views

What bug fixes can be implemented in init.m?

In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m. I ...
1
vote
1answer
809 views

Initialization Cells in CDF

I am wanting to run about 15 pages of initialization cells in a CDF, but can't seem to do so. I have set the InitializationCellEvaluation to True and InitializationCellWarning to False, but it doesn't ...
3
votes
0answers
286 views

“LinkOpen::linke : specified file is not a mathlink executable”

The following code runs fine if I run it interactively: ...
8
votes
2answers
325 views

Efficiently initialize list of consecutively named variables for file import

Let's say I have the code: ...
11
votes
2answers
553 views

Evaluate Initialization Cells of another notebook

Although there may be better ways to get data and definitions from another notebook (packages, read/write dumps, ...), sometimes it is convenient to just evaluate the initialization cells from another ...
2
votes
1answer
425 views

Function definitions in init.m don't work

I can't get any function defined in $UserBaseDirectory/Kernel/init.m to work. For example: ...
5
votes
2answers
248 views

How to make DynamicModule work without an extra ENTER

I've been trying to learn more about DynamicModule (I do not use them, as I used Manipulate all the time). After some time ...
3
votes
0answers
84 views

How to search for initialization cells? [duplicate]

Possible Duplicate: How to select all initialization cells? Is there an easy way to search for initialization cells or have all of them removed at once?
12
votes
1answer
358 views

StringMatchQ and Alternatives throws message in init.m

Bug fixed in 11.2.0 The report of this issue, which itself relates to code of my answer here, exposed a behavior I cannot explain. If I use StringMatchQ in ...
1
vote
1answer
144 views

“Hiding” cells until the first cell is evaluated

This question is based on my earlier question about randomizing labs for students in my computer lab courses. There a perfectly good solution was posted; however, because of privilege problems, I ...
3
votes
1answer
243 views

automatically add Global` to $ContextPath for all notebooks when using CellContext->Notebook

I have some definitions in my init.m. E.g. my init.m contains this: ...
20
votes
1answer
3k views

How often does Mathematica contact its license server?

I know that Mathematica checks the validity of its license every time the program is launched. Say, however, that I have a valid license (which I do) and that I am running some code which takes a ...
1
vote
1answer
363 views

Defining a user defined function in DynamicModule

How can I define a user defined function within DynamicModule? For example, if h[x_] := x^2 I want to find ...