Mathematica notebooks are a convenient document format for storing code, text, graphics, and human readable computation results. But sometimes it would be useful if we could also use them to store machine-readable *datasets*.

There are comments.

# Save data directly in Mathematica notebooks

Mathematica notebooks are a convenient document format for storing code, text, graphics, and human readable computation results. But sometimes it would be useful if we could also use them to store machine-readable

read more ...*datasets*.There are comments.

# Combination tones: Demonstrating the nonlinearity of the human ear

It is known among musicians that when two high pitch tones are played loudly at the same time, a subtle low pitch tone may appear. This is called a

read more ...*combination tone*, or a Tartini tone after 18th-century Italian violinist Giuseppe Tartini, who described the effect.There are comments.

# Fast computation of integer powers

## Introduction

How many multiplications are needed to calculate \(x^6\)? The naïve way to do it is \(x^6 = x\cdot x\cdot x\cdot x\cdot x\cdot x\). That is five multiplications. But we can do better: \((x\cdot x\cdot x)^2\) only requires three. Using as …

read more ...There are comments.

# IGraph/M: a Mathematica interface for igraph

IGraph/M is a Mathematica package for use in complex networks and graph theory research. It started out as a well-integrated Mathematica interface to igraph, one of the most popular open source network analysis packages available. In addition to exposing igraph functionality to Mathematica, the current version of IGraph/M contains many other functions for working with graphs.

read more ...There are comments.

# Frozen Lake Michigan

read more ...

It has been half a year since we left Indiana and I miss our trips to the sand dunes of Lake Michigan. This video was shot at the end of January, 2015, around St. Joseph and New Buffalo, Michigan. The piano music is by Monica Xiao.There are comments.

# Failing Expectations with the Maximum Entropy Principle

Following our recent paper, Reducing Degeneracy in Maximum Entropy Models of Networks, we published a tutorial style blog post on maximum entropy modelling and the degeneracy problem.

Read it on Zoltán Toroczkai’s blog.

read more ...There are comments.

# LaTeX typesetting in Mathematica

read more ...*Mathematica*is an excellent and flexible visualization tool, and even supports displaying complex mathematical formulae. However, its typesetting quality is not on par with \(\mathsf{\LaTeX}\). The visual style is not a good match for inclusion in LaTeX documents either. To improve the quality of my figures, I wrote a …There are comments.

# Displaying debug messages coming from LibraryLink

When extending Mathematica through C or C++ code using the LibraryLink API, one common annoyance is that it’s not possible to see messages that the C code sends to

`stdout`

or`stderr`

when using the graphical interface. While there*are*ways to send output directly to the active Mathematica notebook, often the C code is not written to be used exclusively with Mathematica and it simply prints debug messages to`stderr`

. Standard C assertion failures also cause messages to be printed to`stderr`

.Here I will show how to view the Mathematica kernel’s output in a terminal window, even when using the graphical notebook interface. read more ...

There are comments.

# Setting up RLink for Mathematica

RLink is a standard Mathematica package for accessing R functionality from Mathematica. This is a guide on how to set up RLink with arbitrary R installations on various operating systems and various versions of Mathematica.

read more ...There are comments.

# All your research in a picture

For some Friday fun, here’s a word cloud generated from my Mendeley library. It’s based on a collection of about 400 PDF files, the papers I read for my research. Neutral ecology is a bit overrepresented as I used to maintain a Mendeley group on the topic, but …

read more ...There are comments.

# Pasting tabular data from the web

Have you ever wanted to quickly import some tabular data for quick-and-dirty analysis, either from the web, rich text document, part of a spreadsheet, etc., but then gave up because it seemed too much trouble? This is something I want to do quite frequently, so I wrote a small utility palette for directly pasting tables into Mathematica. To create the palette, just evaluate this code:

read more ...There are comments.

# Memoization in Mathematica

I wrote this short tutorial on memoization years ago. Since it turned out to be somewhat popular, and my old website is going away, I am reproducing it here.

read more ...*Memoization*is a very well known programming pattern in Mathematica. Memoization is an optimisation technique: it means making a function “remember …There are comments.

# Using igraph from Mathematica

**September 2015 update:***If you are looking to use igraph from Mathematica, also take a look at the work-in-progress project IGraph/M. I now recommend using IGraph/M instead of IGraphR except when it does not yet have the functions you need.*

This is a bit of promotion and a …

read more ...There are comments.

# A new website with Pelican

Most people I know in academia have personal websites—it’s expected. And most of those sites haven’t been updated in ages. It’s no wonder; editing HTML or maintaining CMS takes considerable work and requires keeping up to date with the technologies involved. We just can’t realistically …

read more ...There are comments.