# Tagged Questions

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

1k 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 ...
174 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. ...
106 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 ...
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 ...
229 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!
64 views

### How to stop code from evaluating same thing twice?

I have this code for evaluating some fractions: ...
45 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 ...
223 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 ...
216 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: ...
665 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 ...
86 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: ...
738 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 ...
186 views

486 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. ...
478 views

### How to create a Poincaré 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 PoincarĂ© disk ...
98 views

### How to distribute but skipping one level

I would like to write a Rule that mimics built-in Distribute[], but one that distributes Plus...
175 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 ...
83 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 ...
61 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 ...
2k views

### DumpsterDoofus's captivating generative art

How can I render these beautiful images that DumpsterDoofus posted?
137 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: ...
899 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 ...
3k 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. ...
119 views

### Converting code from Matlab to Mathematica [duplicate]

I have the following piece of code: ...
184 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 ...
145 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 ...
3k views

### Convert spectral distribution to RGB color

Presume that 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 ...
407 views

### Given f[1] … f[k], k = 1, 2, 3… how do one find the general function f[n]?

If I have that ...
623 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 ...
142 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 ...
872 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 ...
5k 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!
1k views

### List comprehension in Mathematica

Python supports a concept called "list comprehensions". Following is sample example ...
835 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 ...
508 views

### Linearized Einstein Equations with Mathematica

I need to compute the linearised Einstein Equations around a fixed metric $g_{\mu \nu}$ which is not the flat metric. Someone knows any Mathematica package or a review that can help me?
535 views

### Differential equation of mass spring system with compliant stoppers

I would like to solve numerically the differential equation for the displacement x[t] of a mass m-spring ...
1k views

### How can this type of optical illusion be created in Mathematica?

I see these around the web and would like to make them in Mathematica. Combining them in an array is actually quite mesmerizing!
2k views

### How do I hide some of Input

I have a project with a friend, and we make some work in Mathematica. He is not very good at Mathematica, and I have made some long necessary formulas we need. I would like to show what I've made but ...
1k views

### Extract connected components from PNG image file and write to individual PNG files

Given the PNG image below with the three leaves in it, I'd like to extract each individual leaf and write it to its own PNG file, using Mathematica 9. Note that in the original image, the box bounding ...
2k views

### Playing with Matrix falling code in Mathematica

I was trying to create a Matrix falling code image with Mathematica. Here is my code: ...
583 views

### How to set Block local variables by code?

I need to create a user-defined Block function where the Block variables' values are defined by code. For example, imagine I ...
3k views

### Faster way to convert real strings into numbers [duplicate]

Working with big files, I have to convert some numbers that are in string format into real MMA numbers. I know that I can use ToExpression but it's slow when ...
3k views

### Lyapunov Exponent

Does anyone know a (simple) Mathematica code for computing the Lyuponov Exponent for the Rossler System? Thank you Rossler System: ...
828 views

### How to perform fuzzy lookup between lists?

I have two big lists with 10,000 lines each, with product names from different databases. They have a lot of common products (50%), but they are not typed in the same way. For example there is one ...
306 views

### Making a table with elements like {10i+j, i, j}

Table[10i+j,{i,4},{j,3}] will generate a table that looks like this: {{11,12,13},{21,22,23},{31,32,33},{41,42,43}} I would like ...
553 views

### Composition of mappings not working as expected

I have two functions $f,g:\mathbb{R}^2 \to \mathbb{R}^2$ and I define a third one $h:\mathbb{R}^2 \to \mathbb{R}^2$ as the composition $$h(x,y) = g(f(x,y))$$ I'm trying to get this function into <...
11k views

### Mathematica code for Bifurcation Diagram

At the moment I am trying to construct a bifurcation diagram of the iterative function $f(x)=$ $ax-1.1975x^3$. I've scoured the internet for pre-made bifurcation diagrams and found many (mostly of the ...