# All Questions

1k views

### Factorisation diagrams

Here is a way to visualize the factorisation of natural numbers. How do we get this or a similar kind of output using Mathematica? See the list of images generated for number from 1 to 36:
273 views

### Quickly look-up usages, options and attributes of symbols

When I'm writing code in the front-end, I find myself very often looking up the list of options of a symbol over and over again in the documentation center. In most cases you find there a list of ...
2k views

### How to create this four-dimensional cube animation?

This is a tesseract, a four-dimensional cube, which contains two cubes. Here, each side length of the smaller one is 1, while the side length of the bigger one is 2. How do make I it? I am still ...
853 views

### Constructing election cartograms?

I found this pretty neat page showing cartograms for the US elections and I don't really know how to get started doing these graphics in Mathematica. For those who don't know, a cartogram is a map in ...
1k views

### Remove image background of headshot in Mathematica?

For example, using ExampleData[{"TestImage", "Girl2"}]: what's a general way to make the background transparent? I've tried various combinations of ...
383 views

### How is pattern specificity decided?

Mathematica has a notion of pattern specificity, which is a partial ordering on patterns. The rules (e.g. DownValues, ...
1k views

### How can I detect a rectangular region of interest in a picture?

Here is a downsampled input image I converted to greyscale. To select the rectangular region of interest we first preform preprocessing: ...
3k views

### How can this image (optical illusion) be created with Mathematica?

I came across this image the other day: and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...
382 views

### A palette of accumulated expertise

I've been trying to put together a palette of useful functionality garnered from this site. There is useful stuff scattered all over the place, for example: Post an image Copy code Duplicate a ...
2k views

### Alternatives to Mathematica

Inspired by the recent question Alternatives to LaTeX (currently 58 upvotes) on http://tex.stackexchange.com/: Are there any paid-for or open source alternatives to Mathematica which produce equal or ...
802 views

### Tips on giving a lecture course using Mathematica

I've had a look at this question on giving presentations with Mathematica which is very useful on the technical side of setting up slideshows. However, my question is more about the integration of ...
737 views

### Understanding Pie Chart Annulus generation and alternate style using Disk[]

Background I have been working with a set of data for some time now and I recently decided to change the format. The data is a tree-styled listing of hierarchical names and positions. (* Names ...
608 views

### What are some advanced uses for Block?

I read the answer to this question and this one. According to those, Block is safer (if something aborts, it restores the values) and faster (perhaps something to ...
467 views

### How to extract metadata from an image of a business card?

I'm trying to digitize some documents, and I came across a very cool app called camscanner app which performs parallax transform and ocr very nicely, now I'm implementing it in mathematica... Given ...
670 views

### Why are my plots displaying behind the axes?

I need to create graphs with light gray axes and black lines. All of my plots display behind the axes. How can I make the plots display over the axes? ...
634 views

### Variable naming changes everything

I am having a rather unusual problem I do not understand with Mathematica where renaming one of the variables of my function causes the function to stop "working". Here is the example of the code ...
2k views

### How to plot Venn diagrams with Mathematica?

How does one plot Venn diagrams with Mathematica? I've searched quite a bit and I've found one source at MathWorld which provides the source code for doing them. But I don't understand this code, can ...
644 views

### Numerics with Mathematica

From time to time, I would like to use Mathematica purely numerically, e.g., plotting a function which is defined as an integral which cannot be solve analytically or a solution of a differential ...
431 views

### On drilling holes with minimal redundancy (and with colors!)

The old Mathematica package GraphicsShapes featured the function PerforatePolygons[], which drilled a hole in any ...
643 views

### Find radii of concentric circles in image

I have an image of concentric circles, I would like to find the radii of the circles (only the innermost few are important). I've had a go using what I could find in previous posts, but am a bit ...
905 views

### Joining and interpolating data points

I wonder what is the best practice for interpolating curves? Usually I'm using BSplineCurve and adjusting SplineWeights so it ...
278 views

### What does “EquationalLogicFindCounterexample[]” do?

I found the undocumented EquationalLogicFindCounterexample[] by browsing the lists of available symbols, but I have no clue about its purpose. The name is ...
374 views

### Parallelize evaluation of function with memoization

I have a complicated function that I need multiple times, so I want to memoize it and have the first evaluation done in parallel. Unlike in my example below it's not a continuous function, so ...
484 views

### How to plot a certain surface? What is its parametric equation?

The surface show below is very beautiful; however, I don't know its function either as an implicit function or in parametric form. Anyone have an idea about it and how to draw it with Mathematica?
463 views

### Finding the volume of a sphere using the Monte Carlo algorithm

I used the following code to find the volume of the sphere $x^2+y^2+z^2 = 1$ in the first octant: ...
149 views

680 views

### List of dangerous functions

Introduction Running Mathematica code from an untrusted source is very dangerous. Luckily, Mathematica warns you about dynamic content, so that it is at least safe to open any notebook, as long as ...
1k views

### Can Mathematica propose an exact value based on an approximate one?

Sometimes, I use Mathematica to do some hypothesis on homeworks to make the question easier. For instance, when I have to compute big sums when $n\to\infty$ and Mathematica can't give the exact ...
1k views

### Animating a Voronoi Diagram

edit: Excellent answers have been provided and I made an animation which is suitable for my use, however, all the examples rely on bitmap/rasterized data; is there a vector based approach? I would ...
186 views

### What does InternalInheritedBlock do?

What does the function InternalInheritedBlock do? How is it different from the regular Block?
389 views

### replacement rules from a pattern and a matching expression

(This seems to be a very basic necessity in a language having pattern-matching capabilities such as Mathematica, yet I struggled for many hours to find a common solution to this problem.) Suppose ...
442 views

### Computing polynomial eigenvalues in Mathematica

MATLAB offers a function polyeig for computing polynomial eigenvalues, which appear, for instance in quadratic eigenvalue problems (see here for some applications) such as: ...
459 views

### Continuous evaluation of complex calculations

When having a first look at some system, it's often very useful to just play with the parameters and see how it develops. Therefore, I would like to let a certain evaluation run "until I cancel it". ...
725 views

### Time-series decomposition in Mathematica

I'm studying time-series in R with this book, and there is a nice command in R that creates decompositions. Inside Mathematica 9 the command can be executed as: ...
551 views

### Elegant way of obtaining the envelope of oscillating function [duplicate]

I am solving a differential equation numerically and the output is an oscillating function with the amplitude of the oscillation decaying in time. I would like to extract the power law governing this ...
407 views

### Whether Wolfram Mathematica suits well for doing app in it instead of C++

At uni I have an yearly essay. I'm allowed to use any technology for implementing it. I've been coding it in C++ with Qt. I thought of about Wolfram Mathematica because I have some expirience in it. ...
1k views

### Mathematica Implementations of the Random Forest algorithm

Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
626 views

### How do I split up a curve into segments of equal length?

I have a curve that is defined as f[x] and what I'm attempting to do is to divide the curve into equal straight lengths for a number of segments of my choosing that I've defined as nSeg. I've created ...
682 views

### Find eigen energies of time-independent Schrödinger equation

I'm trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation, $-\frac{h^2}{2m_0}\frac{d^2\psi}{dx^2}+U(x)~\psi=Ei~\psi$ where U(x) is some potential and Ei is the ...
964 views

### My donut has holes in it!

More than one hole, I mean… I’m trying to export from Mathematica into the X3D format, with the longer term goal of generating 3D figures for PDF inclusion. But I'm stuck at the first step: ...
720 views

### Graphical representation of a moving sound source

Some explanation since I have got a specific and another more open-ended question: I used two microphones in a 90° arrangement (see picture below) to capture sound from a source moving around the room ...
1k views

### Programmatically retrieving e-mails from a remote server

Mathematica has a function for sending mail (SendMail) and can import the MBOX format. But what I'd like to do is ...
574 views

Context I'm trying to setup a connection between Mathematica and Google Docs. Specifically, I would like to be able to export data to a Google Spreadsheet (Note: if the spreadsheet is public it's ...
168 views

### Why does list assignment with a packed array result in unpacked values?

This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be possible to give a definitive and exhaustive answer to "why" ...
704 views

### How to control the page size when exporting as a PDF?

When I used Mathematica under Windows, I could control the page size of the pdf files created by Export[...,"PDF"] by setting the paper size in the print menu to ...
235 views

### A fast, robust DropWhile

For reasons that have never been entirely clear to me, Mathematica has had a built-in TakeWhile function since version 6.0, but has no equivalent ...
1k views

### How to make Fourier behave like FourierTransform?

I'm not very experienced with Fourier Transforms, so there may be something inherently wrong with attempting to do this, but how can I make the discrete Fourier behave like the continuous ...
431 views

### Going full functional (Haskell style)

I'm trying to define some notation so that Mathematica code would be more functional, similar to Haskell (just for fun): currying, lambdas, infix operator to function conversion, etc.. And I have some ...