The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
0answers
44 views

Building Pythonic Programming style to Mathematica with visually-accessible list comprehensions?

The question List comprehension in Mathematica has comment about this Functional style using lazy lists? where they build some sort of style for lazy lists: I understand it so that it is impossible to ...
3
votes
1answer
41 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
73 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
162 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
0answers
30 views

Plot of Complex function of two variables

$f(u,v)=\frac{\alpha u}{1+v}$ is a function from $\mathbf{C}^2$ to $\mathbf{C}$. How to plot this function in Mathematica?
0
votes
1answer
35 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
142 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
128 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
81 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
85 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
68 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
51 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
293 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 ...
1
vote
1answer
47 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
125 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 ...
3
votes
2answers
225 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
128 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
64 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 ...
15
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
178 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 ...
2
votes
1answer
133 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
160 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: ...
1
vote
1answer
286 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
68 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
79 views

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

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
246 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
119 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: ...
1
vote
2answers
359 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
177 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. ...
4
votes
1answer
226 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
87 views

How to distribute but skipping one level

I would like to write a Rule that mimics built-in Distribute[], but one that distributes ...
0
votes
2answers
75 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
56 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?
1
vote
0answers
65 views

Solving System of Equations that are made up of variables

I have a few questions as to how to write some parts of this code. Say I chose, n=1 Then it creates two vectors ...
4
votes
3answers
582 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 ...
18
votes
2answers
1k 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
110 views

Converting code from Matlab to Mathematica [duplicate]

I have the following piece of code: ...
2
votes
6answers
174 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
129 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
328 views
7
votes
1answer
307 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
74 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 ...
6
votes
2answers
689 views

Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
23
votes
4answers
3k views

How to create effect like Van Gogh's stroke brush?

I need to apply Van Gogh's stroke brush effect to a random image Take the following image as an example: Thank you so much if you could help!
13
votes
4answers
869 views

List comprehension in Mathematica

Python supports a concept called "list comprehensions". Following is sample example ...
4
votes
1answer
571 views

How to implement Kemeny-Young method? (rank aggregation problem)

Prehistory I am trying to make some statistical analysis of some experimental data, arises from measurements made ​​on an ordinal scale. I faced with the problem of rank aggregation: to get from ...