# Factorial momonents are defined as F_q=
# authors: S.Chekanov
from jhplot import *
from java.util import Random
from jhpro.stat import MomentsFac
c1 = HPlot("Canvas",600,400)
c1.visible(1)
c1.setNameX("Factorial Moment order")
c1.setNameY("Values")
c1.setMarginLeft(100)
c1.setAutoRange()
m=MomentsFac(4) # calculates moments up to 4th order
# use a Gaussian random numbers
r=Random();
for i in range(100):
m.process( (int)(r.nextGaussian()*5+10))
p=m.getResults()
c1.draw(p)
print(p.toString())
Ads help maintain this website.