Questions on finding existing Mathematica implementations or expertise to address a clearly stated problem.

learn more… | top users | synonyms

2
votes
1answer
53 views

How do I center an item in a Grid?

I was trying to use Grid to align different plots, two on the first row, and only one in the second row, so I have something like this (where a,b and c are plots): ...
11
votes
1answer
121 views

Nearest Kronecker Product

Some people (see The ubiquitous Kronecker product by Van Loan) have worked on finding two matrices $\mathbf A$,$\mathbf B$ of specified size whose tensor product $\mathbf A\otimes\mathbf B$ is closest ...
2
votes
1answer
47 views

3D-Plot of a list of complex numbers and a list of real numbers

I'm a newcomer to Mathematica, and I'm having trouble with the following question. Say we have a list of complex numbers list1 and a list of real numbers ...
1
vote
2answers
163 views

intermediate steps of a Mathematica operation

How to make a multiplication or division, the intermediate steps. The numbers can be rational - decimals? it seems the OP merely wants Mathematica to show him how to multiply and divide the way ...
4
votes
1answer
47 views

How to canonically reorganize a list using only a limited set of manipulations?

I want to canonically reorganize (like Sort) a sequence of four objects seq[a,b,c,d], but the only manipulations allowed are ...
2
votes
0answers
98 views

adaptive histogram equalization

There is an interesting algorithm called contrast enhanced adaptive histogram equalization that does histogram equalization on small segments of an image (and then pastes them back together). I know ...
5
votes
1answer
195 views

How to program efficient undershoot/overshoot

I would like to solve the following boundary value problem for $y(x)$ for a fixed value of $k$ between $0 < k <1$: $$y'' + \frac{3}{x} y' - y + \frac{3}{2}y^2 - \frac{k}{2}y^3=0 \\ y'(0) = ...
0
votes
1answer
40 views

How to get the dynamic expression

$$Z_{n+1}=\frac{\alpha Z_n}{1+Z_{n-1}}$$ How to write the above expression in Mathematica? I want to get say Z_100, Z_10 by that scheme. Can I call say $Z_{10}$ if $Z_{n+1}$ is given?
4
votes
1answer
167 views

Lyapunov exponent plot

I am trying to create a Lyapunov exponent plot as a function of $\alpha$ for two functions: $$ f(x) = (\alpha + 1)x - \alpha x^{3} $$ and a piecewise function given by following Mathematica code: ...
2
votes
1answer
141 views

Bifurcation diagram for Piecewise function

At the moment I am trying to create a bifurcation diagram of the discontinuous piecewise function given by following Mathematica code: ...
0
votes
1answer
102 views

How do I find the nearest city out of a list of cities?

I am trying to find the next closest city to city 1 and want to use a certain radius to check what is the closest city I'm trying to create an algorithm for a TSP. Does anyone know how to implement ...
-1
votes
1answer
101 views

Trying to write my own Greedy/ Nearest Neighbor Algorithm

So I'm trying to write my own function and compare it to the results I have from using FindShortestTour. Does anyone know how to find the distance from each city to each of the others without ...
1
vote
1answer
69 views

How would I go about simulating conditional random birth 100 times?

So I have the following scenario: Assume you have this organism that reproduces by itself. An organism either reproduces 0, 1, 2, or 3 organisms at a time. Assume they're asexual and reproduce only ...
0
votes
1answer
61 views

Kronecker Delta and Contraction in Feyncalc

I am trying to simplify a rather complicated equation involving vectors and kronecker delta. I am trying to use Feyncalc for this purpose, but somehow i am not able to do it using Contract/Trick. ...
7
votes
3answers
311 views

Calculating average distance between maxima

I'm having trouble figuring out a way to analyze some simple data. When graphed, the data I have make a somewhat sinusoidal curve. What I want to do is to find the x-values of the maximum peaks of the ...
4
votes
1answer
85 views

Adding extinction factor to Monte Carlo analysis

I'm looking to add an absorption component to this Monte Carlo analysis, essentially I want there to be a 1% chance that a photon gets absorbed at each event as it travels through the medium, once the ...
2
votes
1answer
141 views

3D Vicsek Fractal Notebook

Can I get a link to a notebook that explores this fractal structure? I am specifically asking for a url to a Mathematica notebook that generates and / or visualizes this type of fractal. If that ...
4
votes
2answers
365 views

How to set up a simple Monte Carlo Simulation

there is a 1% chance that there will be a scattering event, if there is a scattering event the direction of scattering will be determined by a random sample of the custom[a_] function and if there is ...
1
vote
2answers
133 views

A cone being intercepted by a slanted plane

I have the 3d cone: Plot3D[-Sqrt[x^2 + y^2], {x, -20, 20}, {y, -20, 20}, Mesh -> None, BoxRatios -> {1, 1, 1}] I need a slanted plane intersecting it. ...
1
vote
0answers
75 views

Implementation of Lubaehevsky-Stillinger Algorithm to pack hard spheres

To generate a model of a polycrystalline material with specified grain size distribution (e.g coming from a Monte Carlo Grain Growth simulation) the Paper "Effects of grain size distribution and ...
16
votes
5answers
3k views

3D surface that looks like a virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers. I am currently trying to build an animation that involves a viral ...
3
votes
3answers
186 views

Code for (a,b) with gcd(a,b)=1?

I am trying to make a big table that includes all ordered pairs (a,b) with a (1,2) (1,3) (2,3) (1,4) (3,4) (1,5) (2,5) (3,5) (4,5) (1,6) (5,6) ... Any ideas? Thanks!
0
votes
2answers
59 views

How to stop code from evaluating same thing twice?

I have this code for evaluating some fractions: ...
0
votes
1answer
37 views

Output form of a result [closed]

Suppose I computed something with Mathematica, and the result is in the form Gamma[1 + N]^2 How can I tell Mathematica to write the result in a more ...
3
votes
0answers
65 views

Tab Completion Command Line

How do I effectively use tab completion with Mathematica program on the command line? programmable completion intro for Bash shell Are there any available tools or packages for tab completion of ...
2
votes
1answer
140 views

How to make hollow Graphics3D?

I keep seeing a notebook to use of Mathematica as a 3D Printing tool (e.g.: this link). In the notebook on slide 8/11, we find these pictures: I'd like to design it as such that, but I don't ...
5
votes
4answers
168 views

Functional way to Climb an Association Decision Tree

Associations are nice tool to create decision trees. Here is a toy example of how I'm starting to use it: ...
2
votes
1answer
313 views

How to implement the directed Barabasi-Albert algorithm in Mathematica?

Does anyone know how to implement an efficient version of the [directed Barabasi-Albert algorithm][1] in Mathematica that scales until hundred of thousands nodes? The directed network mechanism is ...
0
votes
0answers
73 views

Locating Periodic Orbits - Part II

In a previous post Part I I asked how could I locate the x0 position of a periodic orbit. I got only one possible solution but it does not work as I want. Let me be ...
3
votes
0answers
85 views

Is there a way to do a symbolic PLUR decomposition of a matrix? [duplicate]

I am looking for a way to achieve the PLUR decomposition of a maitrx, as given in this paper here. The equivalent syntax in Maple is: ...
1
vote
1answer
311 views

Getting code from the Wolfram Demonstrations Projects [closed]

I saw from mathematica's website, there is a fantastic project about the 2D Riemann Sum. Riemann Sums For Functions of Two Variables I want to see the similar effect in my Mathematica (with ...
0
votes
1answer
133 views

Sum Over Multiple Indices part 2 [duplicate]

Recently I asked this question as I was trying to see how to write a particular Identity. I asked about how to write the following sum: ...
3
votes
3answers
474 views

Sum over multiple indices

I would like to be able to enter the following left hand side of an identity. I can write the right hand side (i think) but am not sure about the left. The Left hand side is ...
1
vote
2answers
230 views

DSolve bvlim error due to Boundary condition at infinity

I am solving an Ode using Mathematica that has boundary condition at infinity which is why Mathematica is showing error message. Please help to tackle this problem. ...
5
votes
1answer
254 views

How to create a Poincare disk type kaleidoscope in Mathematica?

Creating a Kaleidoscope in Mathematica is not a new topic at all, examples can be found from the links like: Wolfram reference and Wolfram demonstrations. My question is how to create Poincare disk ...
1
vote
3answers
92 views

How to distribute but skipping one level

I would like to write a Rule that mimics built-in Distribute[], but one that distributes ...
5
votes
0answers
86 views

Finding quasi-cliques

What is the best way to identify quasi-cliques in a graph in Mathematica? I don't think it has been implemented, so are there any solutions to do this? Or do I have to export the graph data somehow ...
0
votes
2answers
78 views

How do I tell pattern searcher the order in which to search for patterns given in general form?

I have a really long sequence of Symbols inside a function, say nonCommute[a,b,c,e,e,f,g,b,i,j], and I am implementing a ...
2
votes
1answer
60 views

Searching for symbol except within subexpressions with a particular Head

I would like to write a searcher like FreeQ that looks for a Symbol (or Head) in an ...
48
votes
1answer
1k views

DumpsterDoofus's captivating generative art

How can I render these beautiful images that DumpsterDoofus posted?
3
votes
1answer
126 views

Solving a system of generated equations?

I would like to generate a function in the following form, where the number of terms can be specified arbitrarily: ...
4
votes
3answers
610 views

Computing Gaussian curvature

Can Gaussian curvature $K$ be computed from WolframAlpha or any other available Mathematica program? Please indicate the program or its reference. If input ...
21
votes
2answers
2k views

How to build a bvh (a motion capture file format) player in Mathematica?

How to build a bvh player that can be used to visualize human motions in Mathematica? Any idea or sample code would be appreciated. ...
0
votes
0answers
113 views

Converting code from Matlab to Mathematica [duplicate]

I have the following piece of code: ...
2
votes
6answers
176 views

Setting the elements of a list equal to elements of a different list

A = {a,b,c,d,e,f,g,h} B = {1,2,3,4,5} How would I go about setting some of the elements in list A equal to the elements in list B and then the left over elements ...
4
votes
3answers
132 views

Help with coding triangular nodes/elements

I'm trying to write a program where it will shoot out the triangle node numbers. For example, in the picture, if we choose to divide this triangle by 5 points, then the program will return out the ...
20
votes
3answers
1k views

Convert spectral distribution to RGB color

Presume I have a spectrum as a function of wavelength (an example being the blackbody spectrum): I want to convert that to a single RGB color to display on-screen, i.e. the "color" of that object ...
5
votes
2answers
340 views
8
votes
1answer
370 views

How to generate nonperiodic tilings?

I need to generate nonperiodic tilings which are similar to the attached figure (kite-domino tiling). I was thinking the code is similar to the code for the Penrose tiling. However, that code is too ...
2
votes
0answers
80 views

Linearised Einstein equations

I need to compute the linearised Einstein Equations around a fixed metric $g_{μν}=\text{Minkowski metric} + h_{μν}$, which is not the flat metric. Does anyone know a Mathematica package or a review ...