JMathLabTutorial:Statistics (Histograms)

From jWork.ORG
Jump to: navigation, search
Limitted access. Reguest membership or login to this link first if you are already a member
Contents


Histograms

One can fill histograms with data from vectors and matricies.


y=poisson_rnd(2,100)
h=h1d('Poisson',20,1,10,y) 
plot2d()
draw2d(h)

Here we create a vector with random numbers distributed using the Poisson statistics. Then we create a histogram with the title "Poisson", 20 bins, in the range between 1 and 10. Then we use draw2d() to display the histogram. You can access the descriptive statistics as for any vector or matrix.

Analogously, you can do similar calculations for matrices.