when i use n=200, beautiful see picture[img]http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=1487.0;attach=1766;image[/img]
.

the problem appears when i use n any number less than 200 because i think the array is [n]
so speed[j] has 200 values which is pipe into the histogram despite the slider value at n = 21 for example.

see the picture [img]http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=1487.0;attach=1767;image[/img]

haiz
i think i didn't solve it :)

any tips!
i attached the source in case u need to understand the problem.  ;D