The histogram find it's number of element from it's own definition.
It was define as speed[nmax] , so the element always use nmax as the number of element for speed.
When you drag slider to change value of n, it does not change the size of the speed array.

So I add [code]if(n
I also un-comment the following at "Brownian" page under "Fixed relations".
//if(!accumulateData) _view.speedHistogram.clear();
The above code will cause error , when there is no data in the histogram (nothing to be clear).

Please check out the attached xml file.