Newest Questions
96,898 questions
0votes
1answer
19views
Replacement is not working in Table
What is exactly happening here? Table[{(x^2 + y), (x^2 + y) /. x -> 2}, {x, 0, 3}] As the output I am getting: ...
0votes
0answers
16views
How to calculate Kazhdan-Lusztig Polynomials using Mathematica?
How to calculate Kazhdan-Lusztig Polynomials using Mathematica? References: TABLES OF KAZHDAN-LUSZTIG POLYNOMIALS Kazhdan-Lusztig Polynomials - Combinatorics
0votes
1answer
33views
Delimitate non-trivial 3D region from inequalities and project in different planes
I am trying to get 2D projections (onto the xy-, the xz- and the yz-planes) of a highly non-trivial 3D region delimited by 5 complicated inequalities on $(x,y,z)$. It is not possible to intersect the ...
2votes
0answers
57views
Generating random Hamiltonian cycle
I need random Hamiltonian cycles in directed graphs. I guess for me it would be OK to mean by that choosing uniformly randomly from the set of all Hamiltonian cycles. ...
0votes
1answer
82views
Trying to invert a series in Mathematica
I have the function J in two variables $m$ and $l$, which I obtained doing a series for $e$ and replacing $m \rightarrow e\cdot m$ and $l\rightarrow e\cdot l$, given by \begin{align} J(l,m):=& -2 \...
9votes
1answer
135views
Fascinating boids or flocking by Simon Woods: can we invent more?
NOTE: you do not have to read all post. It is enough to read 1st code block below and the the question in bold to start answering. The rest of the post is explanation how this code works. It has been ...
2votes
1answer
106views
Curved edgestyle in Graph
Is it possible to have a particular edge in a graph represented by an arc instead of a straight line? The reason is that for my particular vertex positioning one of the vertices is colinear with a ...
1vote
1answer
48views
How to copy edge directions from one graph to another with different labels?
I have two graphs, g1 and g2, defined as follows: ...
4votes
4answers
480views
How to only replace x^1 not x^n
Is there a better way to replace a variable, not powers of it, than first to replace all unwanted terms by dummy terms and replacing them back later? Input: ...
3votes
1answer
139views
Speeding up v.Reverse[v] or ListConvolve[v,v]
What is the most efficient way to compute v.Reverse[v] or ListConvolve[v,v]? In particular, since most of the products occur ...
3votes
4answers
316views
Best numerical scheme for solving an equation with several variables
I want to create a simple code to solve an algebraic equation named eq[x], and plot x as a function of three parameters ...
7votes
1answer
76views
Why is 2-dimensional array access slow (compared to memoized downvalues)?
The fabricated example below demonstrates a bizarre case I ran into. (If it matters, this is with Mma 14.1 on Apple ARM, but I see the same behavior with Mma 12.3.1 on Intel x86.) On a whim, I tried ...
0votes
0answers
47views
Incorrectly set exception region on the chart [closed]
Please tell me why the inner exclusion area has disappeared on the far right slide of the animation? Link to the full code: https://www.wolframcloud.com/obj/77844eb9-3678-4027-954c-9b4c3ae4ce7d The ...
7votes
0answers
56views
How to run tests for Mathematica package on GitHub actions?
How can tests be set up to run on GitHub actions for a Mathematica package? I am looking for a complete guide or perhaps a live example. This might be possible with the Free Wolfram Engine, but it is ...
3votes
4answers
166views
Make Plot recognise function returning multiple lines
Related problems have been asked and answered many times, but I don't see a solution for my problem. I have defined a function f which returns a vector of values ...