sori was in a hurry to post the laptop battery dying so i didn't explain clearly my problem.

[quote author=Fu-Kwun Hwang link=topic=1487.msg5600#msg5600 date=1269250490]
Have you tried to assign a variable to "Enabled", then set it to false if you want to disable adding data to histogram.
Set it to true when you want to add values to histogram.
i did but it didn't work the way i wanted.

the problem i am trying to solve is this.
i have n = 20
use j instead of i
i have speed[j] = 20 numbers correct and required but i also have 180 zero values because i declared n = nmax and nmax = 200
so the speed[j] actually has 20 numbers spread around 500 but 180 values =0
thus the histogram is displaying a very high probability about 0.8 for the bin = 0 to 50

i want to count only the n = 20, speed[0] , speed[1], speed[2],......speed[19] values in the histogram.

i been thinking and thinking but i can't formulate the codes. and was hoping for an easy selectable option in the Ejs histogram list of field.

chance for tips or example codes for me to do some trial and error?

i tried to do but it makes the applet cannot display the particles.

sometime like

[code]for (int i=0; iif (speed[i] > 0.1) {
histogramspeed[i]= speed[i];
 histogramn = histogramn+1;

Thanks for your help! ;D