Newest 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: ...
PKD's user avatar
  • 31
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
Ahamad's user avatar
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 ...
Gabriel Picanço's user avatar
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 \...
Someone's user avatar
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 ...
Vitaliy Kaurov's user avatar
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 ...
frank 's user avatar
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: ...
internet's user avatar
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: ...
infinitezero's user avatar
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 ...
Alexander Perlis's user avatar
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 ...
Gallagher's user avatar
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 ...
Alexander Perlis's user avatar
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 ...
Yaroslav's user avatar
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 ...
Szabolcs's user avatar
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 ...
mikado's user avatar
  • 17.5k

153050per page