Tagged Questions

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

2k views

DumpsterDoofus's captivating generative art

How can I render these beautiful images that DumpsterDoofus posted?
8k views

The task is: Image shadow removal is an important topic in image processing. If you feel curious about it, you may take a look here, or just google for it image shadow removal There are also a ...
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: ...
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. ...
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!
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 ...
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 ...
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 ...
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!
1k views

List comprehension in Mathematica

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

How to construct the RHS of Wick's theorem

I've been trying this for a few days now, but I just can't seem to find an efficient (speed-wise) functional way to code the following task. Context: I would like to construct an expressions that is ...
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 ...
132 views

questions with hidden but revealable hints and answers

I would like to create a notebook with questions that have attached hints and answers. The hints and answers should be hidden, but the display should clearly indicate (e.g., with a button) that each ...
630 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 ...
483 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 ...
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 ...
450 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 ...
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 <...
304 views

How do I split a list of numbers to monotonic sequences?

Suppose I have: list = {1, 2, 4, 5, 7, 11, 8, 7, 3, 1, -3, -2, 6, 7, 80} And I want to split it to: ...
3k views

Lyapunov Exponent

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

Problems when solving a nonlinear PDE system with NDSolve

The nonlinear PDE system is actually extracted from a research paper published in 2000 Here is the paper link The authors solved the system by using an ordinary differential equation integrator in ...
873 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 ...
407 views

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

If I have that ...
100 views

How to delay the definition of a function from the time of package initialization to when it is first called

I am writing a package where a couple defined functions take a very long time define at initialization time (because they are large CompiledFunctions). However ...
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 ...
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: ...
360 views

How to write a code to solve my ODE problem?

I have the ODE: $$y''+\lambda y = B^3\sin^3(\sqrt{\lambda}x) \ y(0)=0, \int_0^1 y(x)\sin(n\pi x)dx=0$$ I am not sure how to write the mathematica code to solve this ODE, obviously I need here DSolve ...
495 views

Tooltip for a ListPlot3D

I am getting stuck with figuring out how to use Tooltip for a ListPlot3D. Basically I have a list of values for the 3D plot (no ...
510 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?
837 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 ...
409 views

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 ...
How we can write the following Formula in Wolfram: The Fourier Series  f(x)=f(x+2\pi), f(x) =\left\{ \begin{array}{rcr} 1 & & -\pi <x<0 \\ \sin x & & 0<x<...