Skip to main content

Questions tagged [scripting]

For questions about Wolfram Language Scripts (formerly known as Mathematica Script), or running the kernel without direct user interaction.

Filter by
Sorted by
Tagged with
0 votes
0 answers
54 views

I have some code, currently in a notebook, which should produce some output in the same directory as the notebook, for which I am using NotebookDirectory[]. I would ...
Liam Baker's user avatar
0 votes
0 answers
72 views

I have two mathematically equivalent latex strings ...
Kevin Powell's user avatar
4 votes
1 answer
206 views

I have a script that I run from a .wl file which I sometimes run from a notebook and sometimes call using wolframscript -file. I ...
Pillsy's user avatar
  • 18.8k
3 votes
1 answer
88 views

I have stumbled upon a very strange interaction of the system variable $InputFileName when using SetDirectory and ...
Michael Haring's user avatar
2 votes
0 answers
108 views

In Excel, for example, or even in R, one can directly edit the cells in a tabular array. With the new Tabular object in Mathematica, is that possible, or is one compelled to write out a script?
Copper Octopus's user avatar
1 vote
0 answers
33 views

I am trying to run 8 Mathematica Scripts on a HPC that I access through ssh. I wrote this script: ...
Felipe Augusto's user avatar
3 votes
1 answer
198 views

I have a wolfram script that does the following tasks in the following sequence: import 2 csv data files make bunch of plots save 4 PDF files of plots I have licensed ...
Raunak Farhaz's user avatar
0 votes
0 answers
353 views

Is there a way to run Mathematica code in Visual Studio Code that is similar to Python? For example, one can create a Python file called test.py in VS Code and run ...
TDH's user avatar
  • 592
0 votes
0 answers
102 views

I need to define the properties of conjugate transpose in mathematica: Properties of Conjugate Transpose: ...
Reya Rose's user avatar
0 votes
1 answer
168 views

I want to generate multiple charts using Wolfram as a chart generator. To do so I generate an input file, e.g.. example.m: ...
Konstantin Konstantinov's user avatar
3 votes
2 answers
186 views

Here's the code: ...
jWey's user avatar
  • 155
7 votes
2 answers
169 views

Let's say I have video (mp4) of length 02:17:38 (hh:mm:ss), this video is a record of a temperature panel, as shown in the following image. How can I use mathematica to extract the temperature, given ...
Hussain-Alqatari's user avatar
2 votes
0 answers
95 views

Astonishingly, I couldn't find this either by googling or tag search here. CTRL-C completely closes WolframScript (on my Windows 10). But I just want to break the evaluation (if it takes too long). ...
Hauke Reddmann's user avatar
0 votes
1 answer
176 views

I am not an expert in mathematica, I wanted to Split an audio into multiple segments based on the pauses. I asked AI if that is possible, it said: "it is possible". It provided me a code for ...
Hussain-Alqatari's user avatar
1 vote
1 answer
220 views

I have this program which displays errors in the declaration of terms, I've tried to modify it several times but it displays the same errors, apparently in the declaration of the term $(v \cdot \nabla)...
Kamal Khalil's user avatar
4 votes
1 answer
151 views

Is there any command parameter for WolframScript that changes after how many characteres a continuation line is inserted? For example, using // MatrixForm output ...
Hauke Reddmann's user avatar
1 vote
1 answer
261 views

I am trying to find black hole shadow contour with respect to temperature. with metricf[r_] := -((2*M*r^2)/(g^3 + r^3)) + (8/3)*Pi*P*r^2 + 1. So here is my code, <...
Debojyoti Mondal's user avatar
3 votes
4 answers
237 views

I have a = {1, 2, 3, 10}; b= {2, 3, 4, 8}; t= Do[If[a[[i]]+b[[i]]>3,Print[a[[i]]],"No"],{i,1,4}]; 2 3 10 I need to get the result; t={2,3,10}
Alyasaa Jasim's user avatar
4 votes
1 answer
274 views

I find that sometimes when I use wolframscript to run a .wls file (as part of a workflow involving hundreds of such files), its ...
Ed Bennett's user avatar
4 votes
1 answer
257 views

I know this code is wrong, but I am not sure why. I have a system of coupled differential equations. The model is given by the following equations: $\frac{dS_0} {dt} = (1 - \mu_0) \rho_0 S_0 \frac{S_\...
Ben Hardisty's user avatar
2 votes
1 answer
190 views

I'm trying to solve a problem that can be seen in the paper "The Role of the Structural Transformation in Aggregate Productivity". The problem is: Manually it is difficult to find the ...
Alien's user avatar
  • 21
1 vote
1 answer
122 views

I am new to Mathematica and trying to learn its language. I want to solve a non-linear PDE but don't know how to insert it. Would you please help me or give me some tutorial about it?
AWer's user avatar
  • 35
3 votes
1 answer
203 views

Even a simple #!/usr/bin/env wolframscript (* ::Package:: *) Print[1] takes 3 seconds to finish on my computer. Can Mathematica script load only what it needs for ...
matheorem's user avatar
  • 17.7k
1 vote
0 answers
93 views

I have data that I want to export to a text file. ...
Alyasaa Jasim's user avatar
2 votes
0 answers
61 views

I am new user of Wolfram language and Wolfram Mathematica. And want to understand differences and purpose between file formats of ".m", ".wl" and ".wls". I have read ...
Binnat's user avatar
  • 21
0 votes
0 answers
55 views

Just need help figuring out how to plot a graph of an SVEIAR model with its' reproduction number. I'm a bit confused on how to properly make a graph based off the model and reproduction number. ...
izayafiji's user avatar
0 votes
0 answers
69 views

I need help because everytime I plot it doesn't work. ...
izayafiji's user avatar
3 votes
3 answers
531 views

I have just discovered the free (as in free beer) Wolfram Engine, coming with a generous licence. After playing with Mathematica for a while, and missing the notebook feature, I would like to generate ...
antonio's user avatar
  • 161
3 votes
2 answers
426 views

I just started using Mathematica. I got some output in a txt file from some computations in Pari/GP which looks like this: $$ [1,2,3,4; 5,6,7,8]$$ Here I want to import the data into Mathematica and ...
Aditya Ghosh's user avatar
0 votes
0 answers
53 views

I have the following piece of code saved as script.wls that is called using wolframscript -file script.wls <inputs> ...
Bharath Radhakrishnan's user avatar
0 votes
0 answers
151 views

I have a Mathematica code that I want to run via Python using subprocess. The Mathematica code contains two variables that I want to pass through Python. However, when I tried to do that, I always got ...
j.doe's user avatar
  • 123
5 votes
0 answers
133 views

Do you have any ideas on how to most conveniently and easily organize package dependencies for Wolfram Language projects. I would like to have something like a list of packages in projects for .Net ...
Kirill Belov's user avatar
2 votes
1 answer
1k views

I installed the free Wolfram Script and Wolfram Engine on my Mac (I do not have Mathematica), and I generated free activation keys. After entering these keys into the terminal, I am able to run ...
Joe's user avatar
  • 151
-1 votes
1 answer
128 views

Let $r_k$ and $h_k$ be, respectively, the radius and the height of the $k^\text{th}$ cylinder. We have $n$ cylinders. Let $R$ and $H$ be, respectively, the radius and the height of the big that can ...
Hussain-Alqatari's user avatar
1 vote
1 answer
358 views

I have these three equations: ...
Lawton's user avatar
  • 113
0 votes
1 answer
260 views

When the output of a calculation includes exponents or fractions, WolframScript is writing them out on separate lines (exponents one line above, then a line with the rest of the numerator, then a line ...
Lawton's user avatar
  • 113
1 vote
1 answer
120 views

I have a bunch of definitions written in a file that I load with Get["..."], . I would like add a line into the the file so that the evaluation of these ...
Mercan's user avatar
  • 105
1 vote
0 answers
119 views

I need to plot the equipotential lines of the Julia sets of the polynomial $f(x)=x^2-1$ by using Mathematica, but I don't have a good background in programming. Given $f$, with equipotential lines I ...
cartesio's user avatar
  • 111
6 votes
2 answers
249 views

How do you pass negative values as input for a wolframscript? This documentation page explains that the syntax for passing parameters is: ...
mattiav27's user avatar
  • 6,991
0 votes
0 answers
69 views

I have a Mathematica module im_solver.m that I wish to iterate through Python or a bash script. The module runs a bunch o' other modules. At the end im_solver.m executes a diagnostic.m that collects ...
Nick Valverde's user avatar
3 votes
2 answers
230 views

I am looking for a way to enter an m*n matrix interactively using a dialog or a Graphical User Interface(GUI). Further, I would like to use this matrix later for ...
Fermat Agenuine's user avatar
0 votes
0 answers
505 views

I am trying to run a .m file with wolfram script. I use the command wolframscript -file name.m It works until the program arrives to a ...
mattiav27's user avatar
  • 6,991
2 votes
1 answer
199 views

I have a very useful bash script for pre-processing a Mathematica notebook before committing it to my local git repo. It works fine under Windows/Cygwin and under Linux. I like to keep one master copy ...
jjoIV's user avatar
  • 303
5 votes
5 answers
2k views

I made some code (attached below). It is meant to make a list of random numbers that is not divisible by some value k. I wish to be able to not enter a value k, and have the code run regardless. It ...
Robin Hansen's user avatar
3 votes
3 answers
552 views

I am quite new to mathematica, and I simply want to know how to make a custom function, take another arbitrary function as an input. I have attached code that shows what I am trying to accomplish (...
Robin Hansen's user avatar
4 votes
6 answers
242 views

I would like to be able to skip the necessity of entering the last element in the nested lists, and get some default value instead if they are not entered. Below are two lines of code. The first line ...
Robin Hansen's user avatar
1 vote
2 answers
370 views

...
Robin Hansen's user avatar
2 votes
0 answers
178 views

I would like to run a Mathematica package math-simple.m file inside of a bash script file. Howeever, when I write inside of the bash script as: math -noprompt -script math-simple.m I get a warning as /...
Kazim Ahmet Hasim's user avatar
0 votes
0 answers
150 views

During the process of upgrading Mathematica to a newer version, we are presented with the choice of retaining or uninstalling an older version. But it seems that this choice does not extend to ...
Shredderroy's user avatar
  • 5,431

1
2 3 4 5
8