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
1 answer
129 views

Can I use WolframScript to solve this system of equations?

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

Is there a way to make WolframScript give outputs as a single line?

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
  • 103
0 votes
1 answer
61 views

Way to stop reading script file based on conditions, without an "if" block wrapping the entire file

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
  • 3
1 vote
0 answers
61 views

Plotting equipotentials line of a Julia set in Mathematica

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
169 views

Passing negative parameters to a wolframscript

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,444
0 votes
0 answers
31 views

Data Export not working when running module using Wolframscript compared to executing in notebook

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
1 answer
182 views

Shading an area enclosed by a loop

I am plotting the folium of Descartes as a parametric plot, and trying to find the arclength and the area enclosed by the loop. I got both of them covered result-wise, but my professor wants us to ...
Jakob's user avatar
  • 176
3 votes
2 answers
143 views

Entering matrices interactively

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
79 views

Correct way to plot with wolframscript

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,444
2 votes
1 answer
96 views

WSL/Ubuntu breaks evaluation of WolframScript batch file via symbolic link

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
  • 153
5 votes
5 answers
2k views

How can I ignore an argument?

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
388 views

How to make a function take another function as an input?

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
2 votes
3 answers
105 views

How to make an element in a list nested within a list have a default value?

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
151 views

Function within For Loop wont give me any output [closed]

...
Robin Hansen's user avatar
1 vote
0 answers
80 views

How to run Mathematica from a bash script file? [closed]

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
66 views

How can I retain an old version of wolframscript during an upgrade?

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
  • 4,957
3 votes
1 answer
55 views

How to force standard output as FortranForm while calling a script from terminal

Here's a simple script saved in the file fortranOutput.wls x = ToExpression[$ScriptCommandLine[[2]]] d=FortranForm[x] Print[d] When I call this function from the ...
Ahmed Abdullah's user avatar
0 votes
0 answers
58 views

Can Mathematica automatically submit a code for evaluation every 10 seconds?

I would like to automatize Mathematica to run the code: [Geolocation] every ten seconds. Is that possible? I have searched online, but could not find any ...
Vangsnes's user avatar
  • 561
1 vote
2 answers
233 views

Can we solve the following integral by MATHEMATICA?

I am trying to solve the integral using the following Mathematica code. f1 = (t[m + 1] - t)^(\[Alpha] - 1)*(t - t[m - 1])*(t - t[m - 2]); ...
ZSN's user avatar
  • 13
2 votes
3 answers
114 views

Removing lists containing some rules

Consider a big list of lists of rules, namely ...
Smilia's user avatar
  • 496
4 votes
1 answer
86 views

Graphing the equation only after the right answer is picked

I need the equation in the question to be graphed only after the right answer is picked I'm using this form to write questions : ...
Tt Tt's user avatar
  • 329
1 vote
0 answers
54 views

how to add questions with grades

I want to add questions with grades, I'm using this form to write questions : ...
Tt Tt's user avatar
  • 329
0 votes
1 answer
54 views

Getting 3 points although the code describes 1 point in the plane

I'm trying to plot the closest point in the plane to the point P (the one that can be dragged) but in the graph appears 3 points. in the graph I'm plotting a plane and a point P, I want to add another ...
Tt Tt's user avatar
  • 329
9 votes
2 answers
176 views

Controlling point in graphics 3D with locator

I want to control a point in 3D graph by dragging it with the mouse lets say this is my code and I want to add some functionality like the way locator works in 2d graphics ...
Tt Tt's user avatar
  • 329
0 votes
1 answer
88 views

Error : Array {-6, 2} has the wrong dimensions for a graphics coordinate list [closed]

I'm trying to plot two lines and the point of intersection between them, and I got this error : ...
Tt Tt's user avatar
  • 329
3 votes
2 answers
97 views

How to change the manipulation of the point Q to a Locator?

I want to control the point Q by a Locator not with Slider, how to make this work? ...
Tt Tt's user avatar
  • 329
0 votes
0 answers
75 views

Multiple 2D and 3D plots in a table with mathematica/wolfram

I'm a mathematica newbie! I want to display 15 plots (5 rows labeled by "A" "B" "C" "D" "E" and 3 columns labeled by "P1" "P2" &...
WaterFox's user avatar
  • 185
1 vote
0 answers
125 views

What are the limitations of using Wolfram cloud?

I have a program which requires more than 2 hours of running on my computer. I tried to use Wolfram cloud to run the script, but after few lines on evaluation and reaching the time consuming part, the ...
Mohamed Mostafa's user avatar
1 vote
1 answer
73 views

Wolframscript: Removing prepended message from Print in slave kernel

I am running a parallelized algorithm using WolframScript and inside the function being passed to the various kernels, I have print statements that track the computation and output the print ...
shanedrum's user avatar
  • 557
0 votes
0 answers
54 views

Pass parameters to notebook being opened?

Is there a way to pass a parameter to a notebook which is being programmatically opened? For example, I would like to be able to pass a parameter to myNotebook.nb ...
Chris Degnen's user avatar
  • 30.5k
1 vote
1 answer
84 views

Execute script in text mode and keep interpreter open

I'm on linux using Mathematica 12.1.1 in text mode, i.e. command line. How do I execute a script (which for me just means a text file with valid Mathematica expressions in it), display the results and ...
Fetchinson0234's user avatar
2 votes
0 answers
67 views

How can we call Mathematica functions from another server using the `wolframscript` Python library?

How can we use the wolframclient Python library to call Mathematica functions when Mathematica is running in an another server? For example, if we have Mathematica ...
GarouDan's user avatar
  • 1,536
4 votes
1 answer
107 views

TaskWait, SocketObject, and WolframScript

I want to launch an asynchronous task with Wolfram Script to listen to a socket and print back information in the CLI. This was handled in previous versions by ...
kale's user avatar
  • 10.8k
2 votes
1 answer
207 views

Why Mathematica does not return explicit output [closed]

I am new to Mathematica. One thing that I don't get is why if I define a matrix and give it a name, then use the name in another function, I get back the function itself. However, When I use an ...
Rudinberry's user avatar
1 vote
1 answer
118 views

NSum::nslim: Limit of summation k is not a number. Help, please( [closed]

...
Casper's user avatar
  • 43
4 votes
1 answer
180 views

Empty .png figures generated by a function "PlotWithGrid" whereas no problem with Export function

I have an issue about a .wls script that I can't manage to solve for the moment. I execute it with wolframscript interpeter on ...
youpilat13's user avatar
0 votes
0 answers
80 views

Reading an old file with newer versions of Mathematica

So I was given code for mathematica software in the form of an nb-file, but my mathematica sofware isn't reading it or detecting an nb file in my computer. I'm assuming this code was done a few years ...
user5896534's user avatar
0 votes
1 answer
31 views

Weird behaviour when taking input from the terminal using $ScriptCommandLine

I am trying to create a .wl file that can be run from the terminal using wolframscript. The script looks something like ...
Bharath Radhakrishnan's user avatar
0 votes
1 answer
81 views

Getting Error on differential equation Mathematica [closed]

There is a Differential equation that I had to Implement on Mathematica. But I am getting this error over and over. don't know what I did wrong I tried this but does not work. ...
bighero666's user avatar
2 votes
2 answers
115 views

Plot issue : put a legend instead of a top label

I have an issue about putting a legend consisted of a text and numerical value instead of a label. For example, with this command line : ...
youpilat13's user avatar
1 vote
1 answer
64 views

Plot issue : bad label ordering with concatenation of strings

I have an issue about a label which is consisted of a variable name [Omega]BD and a numerical value associated. Firstly, I put the BD subscript to ...
youpilat13's user avatar
0 votes
1 answer
149 views

Export all figures and plots produced from a Wolfram script into a single PDF

Here is a .wls script that produces different images into .jpg format. I would like to export directly all the images in a same ...
youpilat13's user avatar
0 votes
0 answers
206 views

Find a way to have all progressively human reading or logical steps in a symbolic calculus and improve rendering

I have the following Mathematica notebook on this link notebook link 1.First, I would like to generate in an automatically way this notebook to a Wolfram script that I can make run directly from ...
youpilat13's user avatar
0 votes
0 answers
60 views

Save figure of a plot following a conversion from notebook to Wolfram script

I have the following Mathematica notebook on this link notebook link I have converted it to Wolfram script. Once done this, I am trying to save the plots as png ...
youpilat13's user avatar
0 votes
0 answers
56 views

Using and executing the missing complex functions of Mathematica in Wolfram script *.wls

I have the following Mathematica notebook on this link notebook I was told that the binary wolframscript couldn't understand some complex functions of Mathematica. First, I would you like to convert ...
youpilat13's user avatar
2 votes
0 answers
68 views

Running wolframscript results in "Failed to open configuaration file at path"

The wolframscript configuration file exists and have all of the permission enabled. When I start wolframscript on Ubuntu 16.04.2 LTS, it starts fine. However, it produces the following error message. ...
Evan's user avatar
  • 21
7 votes
0 answers
112 views

Fork/Pull Request ResourceFunction?

Wolfram is so rapidly evolving its extension technologies, that it's hard to figure out how to meaningfully contribute to the community. Over the years we've seen: Applications, Packages/Paclets and ...
Ranza's user avatar
  • 1,175
1 vote
0 answers
39 views

Mathematica prints out "List" in For cycle [closed]

So I run a For loop and "List" print outs come out of nowhere, how do I get rid of them
KrisU's user avatar
  • 11
3 votes
1 answer
210 views

Front End Not Available Error in Wolfram Script

I have a script to produce a custom palette that works perfectly well when run in a MM notebook, but when I try to run it as a standalone Wolfram script, it produces the dreaded: FrontEndObject::...
Jonathan Kinlay's user avatar
4 votes
1 answer
179 views

How to add doodles and sketches in a mandala

i discovered mathematica yesterday; and i've been playing with RandomMandala since. i also saw this question; and i really liked the second answer; but i like the ...
oussama ghrib's user avatar

1
2 3 4 5
7