I have been experimenting with ways of keeping a journal for my research since I started my PhD. I have done everything …

# Author: Martin

## Chaining function calls in Matlab

Matlab has a nice feature that lets you chain commands by treating functions as variables. This means that you can write: a …

## Saving from inside a parfor loop in Matlab

If you call save from a parfor loop in Matlab, like this for example: parfor k=1:100 foo = exp(-k); save([’myfile’,num2str(k),’.mat’],’foo’); endparfor k=1:100 …

## Making function returns in Matlab compact

I used to write this in Matlab: foo1 = zeros(1,100); foo2 = cell(1,100); for i = 1:100 [tmpFoo1, tmpFoo2] = foo ( …

## Understanding the Metropolis Hasting algorithm – A tutorial

The Problem Say you want to evaluate the expectation of a function over a random variable $$E[f(x)] = \int p(x)f(x)dx$$, or perhaps …

## A short tutorial on Kernel Density Estimation (KDE)

The aim of Kernel Density Estimation(KDE) is: Given a set of $$N$$ samples from a random variable, $$\mathbf{X}$$, possibly multivariate and continuous, …

## The psychology of debugging – the bias of complexity

Most of the times when you are writing code you are make mistakes either in the structure or in the specific code. …

## The start-up evangelic

Attended the Stockholm Start-up Day 2013 event. It was really fun and the event was well organized with a good flow. It is …

## Partially fixing numerical underflow for mixture models

In a mixture model the probability of an event $$x$$ is written $$P(x=X) =\sum_{i}\pi_{i}P_{i}(x=X) $$, where $$\pi_{i}$$ is the probability of the …

## Google can keep Keep….

I used to be a Google fanboy. However the disbanding of the Google Reader together with a bunch of thoughts on it …