From: Lennart van Luijk on
Got it!

I generated an m-file so I could see which functions are used by GA.

Then, I saw my mistake: number of input variables for the Fitness function. I thought it had to be 1, because a population is 1 matrix.
Instead, it has to be set to the desired length of the bitstring, the GenomeLength.

Now it works! Thanks for your help, it brought me some good ideas.