20
votes
Restarting Mathematica automatically
You could launch a different kernel and use that to run the computation. You will be controlling this "slave kernel" from another Mathematica session. This will allow you to script even quitting and ...
9
votes
Automatic image recognition of Lissajous figures on oscilloscope
This is not a particularly efficient solution, but it works since you have a very limited range of possible parameters, and the screen images are not too distorted. It also determines only ...
9
votes
Restarting Mathematica automatically
On Windows you can run your cycles in a batch file like this:
...
8
votes
Accepted
How to automatically do a computation, Quit[], restart and do a new computation
You can start a fresh extra kernel programmatically from your current notebook using MathLink. You can then load packages in that kernel, perform necessary calculations, get the result back to your ...
6
votes
Accepted
Drawing finite-state automata without using VertexRenderingFunction
You can use the default vertex shape (Disk) and use the option VertexLabels (that is, no need to use ...
5
votes
Is the WolframScript error message "The product exited because of a license error" accurate?
I wrote the following file and ran it with WolframScript:
#!/usr/bin/env wolframscript
Pause[10000000000]
and ran it with
...
5
votes
Automatic variable naming
Subscripts are evil. Why don't you use an Association? This would get you rid of the whole numbering business. This could look like this:
...
5
votes
Accepted
Define Macros to automatically change keyboard input
With an input auto replacement like "fss", you need to have some way of telling Mathematica that "fss" is a complete token. That is, "fss" only gets replaced when the next character is not a letter. ...
5
votes
Accepted
4
votes
Creating an Array with Subscripts and Superscripts
Cs = {1, 2, 4, 5};
Ss = {1, -1, 1, -1};
Ss1 = Ss /. {1 -> "+", -1 -> "-"};
Thread[Subsuperscript["c", Cs, Ss1]]
You can also <...
4
votes
Accepted
Creating an Array with Subscripts and Superscripts
You may use, e.g.,
MapThread[
SubsuperscriptBox["c", ##] &,
{Cs, Ss1}
]
4
votes
Accepted
Is there a way to automate this procedure?
Try writing your code as a series of functions that link back to each other rather than manually carrying results through. For example, instead of copying ...
4
votes
Seeking strategies to deploy a function securely without a front end
Contrary to what most people say (including people working at Wolfram), you do not need Mathematica to run Wolfram Language scripts. What you need is a MathKernel and the wolframscript interface. You ...
4
votes
How to make a for loop to automatically make a series of m differential equations?
Using symbols like "n1" makes it complicated. I would rather use indexed symbols like "n[1]" or subscripted symbols.
...
4
votes
Evading the fewer dependent variables than equations error
DSolve[{f'[x] == 0, g'[x] == 0, f'[y] == g[y]}, {f, g}, x]
(* {{f -> Function[{x}, C[1]], g -> Function[{x}, 0]}} *)
Or
...
3
votes
Evading the fewer dependent variables than equations error
Here's a start (a truck fire shutdown the highway and we were stuck in the mountains; so I had some extra time and got the below to work with systems as well). Assumptions about input:
The systems ...
3
votes
Accepted
How to omit the authentification dialog during URLRead?
V11 update
For new functions it is enough to use documented Interactive option:
...
3
votes
Accepted
How to get a audio file's duration time in Mathematica?
Now,in Mathematica 11.
Using Duration function make it more easily:
Import["ExampleData/car.mp3", "Duration"]
Or
...
3
votes
How can I terminate a MathKernel that is running an external program after a timeout?
Without the program in question, I had to fake it using sleep (which may not even exist on Windows), but here's a rough outline that I believe will work for your ...
3
votes
How to make a parallel auto-generated .wl package from a .nb notebook
UPDATE 2.0
I just discovered this wonderful answer by Mr. Wizard on saving as a package via FrontEndTokenExecute and so this is an even more trivial task now:
...
3
votes
Accepted
3
votes
Accepted
How can I get Manipulate[] graphics to print when batch printing notebooks?
Consider this. I have 3 notebooks, {"nb1.nb", "nb2.nb", "nb3.nb"} which for the sake of testing all have a simple Manipulate ...
2
votes
Accepted
Automatic indentation of text and equations depending on Style
Here's a button that can do this for you. I put it in a docked cell:
...
2
votes
How to use module to assign functions to a set of imported text files?
Next, I would like to loop the whole process so that I don't have to
copy and paste my code 8 times for each individual file.
Since Import[..., "Data"] worked ...
1
vote
How to make a for loop to automatically make a series of m differential equations?
This can be done using Interactions in my EcoEvo package. First, install the package (only needed first time):
...
1
vote
Accepted
How to use 'Join' and '& /@' : combining all .csv files in a directory into a single .csv file automatically
Join is expecting a sequence, as you can see in your MANUALjoin.
You can convert your list of lists into a sequence of lists as follows:
...
1
vote
Automate Poisson Football Scores Prediction
I modified code as follows to obtain decimal form:
...
1
vote
Running a notebook which imports and exports files repeatedly
Not knowing all of the details, I suggest using an additional Notebook to automate the operation of "my_mathematica_notebook.nb"
In the new Notebook
...
1
vote
Load multiple csv files and do iterative calculation for each file
What do your CSV files contain? Single columns? Multiple columns?
In any case ...
Generate some data, then export it:
...
1
vote
Issue with NotebookPrint to export multiple notebooks to PDF in Mathematica 11.1
Using AbortProtect[] solves the problem.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
automation × 78notebooks × 10
list-manipulation × 8
front-end × 8
import × 7
export × 6
scripting × 5
web-access × 5
differential-equations × 4
parallelization × 4
kernel × 4
kernel-startup × 4
equation-solving × 3
performance-tuning × 3
graphs-and-networks × 3
warning-messages × 3
packages × 3
formatting × 3
procedural-programming × 3
plotting × 2
functions × 2
manipulate × 2
image-processing × 2
scoping × 2
code-review × 2