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
35 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 ...
  • 179
9 votes
2 answers
154 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 ...
  • 179
0 votes
1 answer
28 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 : ...
  • 179
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? ...
  • 179
0 votes
0 answers
45 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" &...
  • 101
1 vote
0 answers
55 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 ...
1 vote
1 answer
58 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 ...
  • 557
0 votes
0 answers
45 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 ...
  • 29.7k
1 vote
1 answer
69 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 ...
1 vote
0 answers
54 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 ...
  • 1,436
4 votes
1 answer
87 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 ...
  • 10.7k
2 votes
1 answer
102 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 ...
1 vote
1 answer
87 views

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

...
  • 43
4 votes
1 answer
156 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 ...
  • 1
0 votes
0 answers
45 views

Wolfram script exported from a Mathematica Notebook : errors actually warnings?

I have exported with the following script put at the beginning of my Mathematica notebook : ...
0 votes
0 answers
71 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 ...
0 votes
1 answer
28 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 ...
0 votes
1 answer
79 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. ...
2 votes
2 answers
87 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 : ...
1 vote
1 answer
55 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 ...
0 votes
1 answer
90 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 ...
0 votes
0 answers
202 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 ...
0 votes
0 answers
48 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 ...
0 votes
0 answers
51 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 ...
0 votes
0 answers
32 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. ...
  • 1
7 votes
0 answers
108 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 ...
  • 1,125
1 vote
0 answers
38 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
  • 11
3 votes
1 answer
101 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::...
0 votes
0 answers
50 views

Is there a way to access the previous evaluations (%, %%, ...) in a Wolfram Language Script when run from the command line?

In this example of a .wls file, I attempt to retrieve the output of the last evaluation (the string "Hello world") and print it just as in a notebook: This works when I open the file with ...
  • 483
0 votes
0 answers
73 views

Import the package (.wl) file in the notebook (.nb) format to help understand it

It's well known that mathematica use .wl file to store a package, which has very different writing flavor and execute behavior from those of the notebook (.nb) file. In general, IMO, the package (.wl) ...
4 votes
1 answer
160 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 ...
-4 votes
2 answers
162 views

Wolfram Mathematica Code please [closed]

Consider two natural numbers of two-digits, like 46 and 96. They have the property that by exchanging the place of their digits and multiplying the so obtained numbers, we get the same product; i.e., <...
1 vote
1 answer
288 views

How to do that Fourier transform?

I want to perform Fourier Transform of $$\frac{\exp(jkr)}{r},$$ where $k=\frac{2 \pi}{\lambda}$ and $r=\sqrt{x^2+y^2+z^2}$. The result should be $\exp\left(jkz \sqrt{1-(\lambda u)^2 - (\lambda v)^2} \...
  • 19
1 vote
0 answers
25 views

SessionSubmit + ScheduledTask is not working in wolframscript environment

I have, for example, the following scheduled task SessionSubmit@ScheduledTask[ Print["testing..."] ,{Quantity[1,"Seconds"],Infinity}] which ...
  • 425
0 votes
1 answer
40 views

Updating the association with answers from the TrigProperties Function

I have created a list of rules I would like to update with values. My goal here is to be able to write the following: ...
1 vote
1 answer
76 views

Outputting probability of rolling 6 dice N times, generating a new output each roll

I am looking to output the probability of n classic six-sided dice but I am not sure how to go about starting. This is what I have written out so far, but no way to go about accounting for n dice for ...
1 vote
2 answers
56 views

Code should not evaluate at non-integers, fail at too few integers

I want this piece of code to sort a given list by odds first and evens last. This piece of code did the trick with the list I entered in: ...
0 votes
0 answers
36 views

Pokemon ELO rating with wolframscript

I would like to implement a Pokemon ELO system that my friends that don't have Mathematica installed could use as well via Wolframscript. The application would work as follows: You run a script ./...
  • 1,264
2 votes
2 answers
117 views

How to find the supremum of a brownian motion?

I imagine this is quite simple but unable to find it, if I simulate a standard brownian motion, $(B_t)_{t \geq 0}$, with ...
0 votes
0 answers
42 views

Why is the `N` function giving me the wrong result when using WolframScript? [duplicate]

I am using wolframscript.exe to learn mathematica and I would expect the following code to return 0.7071: ...
  • 185
0 votes
0 answers
52 views

How to give a path to a file in a package file?

How do I fix the problem with zsolve in the picture? I do not know how to give the path to zsolve.
3 votes
1 answer
64 views

Probably easy question: How to make the Text font in the subscript?

In the specific Graphic setting, precisely (somehow \ ( and \ ) are not shown properly below in Stackexchange window) Graphics[Text[Style["\ !\ (1234_L\ )",LineSpacing->{0,12}],{0,3}]] ...
  • 823
1 vote
1 answer
80 views

Is it possible to do grid like printing on commandline when executing scripts on Ubuntu?

I am executing scripts on command line (cli) using wolfram -script code.m. However I couldn't find a solution that can print data in a grid like or fixed-width ...
  • 912
0 votes
0 answers
55 views

What is tilde ~ meaning in coding Mathematica? [duplicate]

I got this code to solve problem 500 in euler project. I was managing to figure out what they mean but got stuck in translating the tilde (~). It seems tilde has no specific meaning and when I change ...
  • 1
-2 votes
1 answer
101 views

Why this Basis Parabolic PDE's solution is not smooth?

What is this Parabolic PDE modeling in real life? Why the solutions is not nice? Have I made any coding errors? $\frac{\partial u(t,x)}{\partial t}=\frac{\partial^2 u(t,x)}{\partial x^2}$ $\frac{\...
  • 103
5 votes
1 answer
78 views

Individual block diagonalisations take more time than single diagonalization of block matrix

Sample Problem of a large block matrix: I want to find the lowest eigenvalue of a blockdiagonal matrix h[x] for a range of values of ...
  • 902
0 votes
0 answers
66 views

MathLink related error on HPC

Most of the times, Mathematica gives the following error for the jobs submitted on multiple nodes in queue: ...
  • 902
0 votes
0 answers
26 views

FaceFeatures - How to better customise the details of JSON output file?

I am using FacialFeatures to identify the age and gender of characters in movie frames. I am using the following script (simplified from this source): ...
  • 17
1 vote
0 answers
68 views

Exit Wolframscript by Ctrl+C without interrupt prompt

How can a Wolframscript be terminated by Ctrl+C without yielding the Interrupt prompt (see e.g. here)? Unfortunately, this self-proclaimed hack causes a ...
1 vote
0 answers
88 views

Wolfram script does not work due to memory shortage and/or "license error" (FacialFeatures function)

I am trying to run a wolfram script on my windows cmd prompt. The script (available here) uses the function Facial Features of Mathematica. It is important to highlight that I need to process this ...
  • 17

1
2 3 4 5
7