18 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

I am an init.m ascetic. And I doubt after 30+ years of using Mathematica I will change. Everyone else, who wishes to, may proclaim how it is indispensable to their workflow, and I will accept their ...
16 votes
Accepted

Detecting kernel initialization

Apparently, Throw is deactivated during kernel initialization. The following function can determine if Throw is inoperative: <...
WReach's user avatar
  • 68.9k
14 votes

Detecting kernel initialization

After some spelunking, I found a file which contains a lot of initialization code, including reading the kernel init.m file, loading ...
Szabolcs's user avatar
  • 235k
13 votes
Accepted

Why does args symbol exist in a fresh kernel?

It's a type of otherwise harmless bug that tends to come and go with versions. I would suggest to report it to Wolfram, but also not to worry about it. Notice that the symbols have no associated ...
Szabolcs's user avatar
  • 235k
11 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

I tend to put a lot of little functions in my init.m file, functions that take arguments and use module variables. I found that I would now have Global symbols like ...
10 votes
Accepted

Register "initialization code" to run on any newly started parallel kernel

I found two ways to do this. Both are undocumented, so all usual caveats apply. Parallel`Developer`$InitCode This can be done using ...
Szabolcs's user avatar
  • 235k
8 votes

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

The Autoload mechanism can be used for this. Place the package in $UserBaseDirectory/Autoload or ...
Szabolcs's user avatar
  • 235k
8 votes
Accepted

Is there a (simple!) way to convert all initialization cells of a document to normal cells?

A simple and efficient programmatic approach: CurrentValue[Pick[#, CurrentValue[#, InitializationCell]] &@Cells[], InitializationCell] = Inherited; Just ...
Alexey Popkov's user avatar
8 votes

Regarding phase space diagram/trajectory

Using ScalingTransform to project to the three planes. Only need p1 in the original code. ...
cvgmt's user avatar
  • 72.9k
7 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

...
7 votes

Nonlinear experimental data fit without initial parameters

The main issue is that you haven't programmed your model correctly. In your theoretical model you have $|\tau|$ but in the Mathematica code you don't have the absolute value. Making that change and ...
JimB's user avatar
  • 41.7k
7 votes

Regarding phase space diagram/trajectory

...
Syed's user avatar
  • 54k
6 votes

Non linear fit without initial parameters

I do not think that it is a reasonable request to do the fit without initial parameter values when you are working with such extreme numbers. The optimization algorithms will typically need to choose ...
Szabolcs's user avatar
  • 235k
6 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

...
5 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

As I mentioned in a comment, I do not use an init.m file, I paste my frequently used functions from project notebook to project notebook as an initialization cell. That having been said, my ...
4 votes

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

This works Parallel`Developer`$InitCode=Hold[Get[FileNameJoin[{$BaseDirectory,"Kernel","init.m"}]]] c/o Register "initialization code" to run on any ...
Chris Degnen's user avatar
  • 30.9k
4 votes

"Hiding" cells until the first cell is evaluated

Here's an option that allows you to work from the stylesheet and avoid any of the pernicious issues with Dynamic and slow notebooks. The trick will be to use the <...
b3m2a1's user avatar
  • 46.9k
4 votes

Strange Error with Initialization within Animate

This has to do with the order in which the arguments of Animate are executed. Let's see if we can determine that: ...
Sjoerd C. de Vries's user avatar
4 votes

Non linear fit without initial parameters

You need to rescale your data as Scabolcs suggests. I tried without rescaling and the fit did not work. So try ...
Hugh's user avatar
  • 16.5k
4 votes
Accepted

Why is loading a list of contexts with Map Get not working?

Would this be acceptable? list1 = {"Testpack`", "NBStyles`", "NBUtilities`", "NBTasknmate`"} Map[Get, list1]
Drod's user avatar
  • 310
3 votes

How can I jump to the next initialization cell?

Select[Cells[], CurrentValue[#, InitializationCell] &] You can use SelectionMove or just click on those objects to go ...
Kuba's user avatar
  • 137k
3 votes

Why does args symbol exist in a fresh kernel?

It exists, because someone somewhere did something wrong, as stated everywhere in all similar questions. For me it was a question for a long time, which file exactly caused the problem. So that exact ...
Uladzimir Kh.'s user avatar
3 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

The documentation for init.m is functional, if sparse. There are no Examples, and there is no ...
3 votes

Starting notebook from text mode

Using a package file open.m Needs["JLink`"]; $FrontEndLaunchCommand = FileNameJoin[{$InstallationDirectory, "Mathematica.exe"}]; UseFrontEnd[CreateDocument[]]; ...
Chris Degnen's user avatar
  • 30.9k
3 votes
Accepted

Why InitializationCellWarning is False and still I get warnings?

You could simply do SetOptions[$FrontEndSession, {InitializationCellEvaluation -> True, InitializationCellWarning -> False}]; Now Initialization ...
Alexey Popkov's user avatar
3 votes

In a Notebook, How can I set every cell to be an Initialization cell?

If you want the entire notebook converted to Initialization cells, Ctrl-A the notebook, selecting all the cells and then Ctrl-8 to convert them all to Initialization cells.
Lexington1776's user avatar
2 votes

Cannot set DownValues to ValueList while loading package

That is an ancient package (revision date 1991-07-01) and it is unsurprising there are incompatibilities. Specifically the package seems to be making definitions in a strange way with an undocumented ...
Mr.Wizard's user avatar
  • 272k
2 votes

Batch Loading of Mathematica Packages and Issues with Autoloading

I have tried loading the core package file into the kernel, but the kernel exits as soon as the script file is loaded, whereas I need it to stay open to continue to service the ScheduledTasks. I ...
Joel Klein's user avatar
  • 5,225
2 votes
Accepted

Initializate Manipulate

...
Nasser's user avatar
  • 144k
2 votes
Accepted

How can the format of Initialization Cells be set to the format of normal input cells?

Probably the simplest solution: ...
Alexey Popkov's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible