SIMION®
The field and particle trajectory simulator
Industry standard charged particle optics software
Refine your design: model > simulate > view > analyze > program > optimize it.
SIMION v8.1.3.0-TEST posted.
About | Documentation | Community/Support | Downloads | Ordering

simionx.Statistics - Statistics utility functions

SYNOPSIS

local Stat = require "simionx.Statistics"

-- Generate table of uniform Gaussian random numbers.
local t = {}
for n=1,10000 do t[#t+1] = Stat.gaussian_rand() end

-- Compute mean and standard deviation.
print("mean", Stat.array_mean(t))   --> "mean   0.011016404779235"
print("stdev", Stat.array_stdev(t)) --> "stdev  0.99160454577423"

-- Generate histogram.
local hist = Stat.make_histogram{data=t, nbins=10}
print(hist)
--[[OUTPUT:
    {npoints=10000,nbins=10,binmin=-4.382378,binmax=4.488155,\
    binsize=0.887053,centerbins=true,normalize=true}
    -3.938851,0.000451
    -3.051798,0.004171
    -2.164745,0.039682
    -1.277692,0.180823
    -0.390638,0.351839
    0.496415,0.356912
    1.383468,0.157826
    2.270521,0.030776
    3.157575,0.004622
    4.044628,0.000225
]]

DESCRIPTION

This module provides various statistical functions.

Note

This page is abridged from the full SIMION 8.1.1 “Supplemental Documentation” (Help file). The following additional sections can be found in the full version of this page accessible via the “Help > Supplemental Documentation” menu in SIMION 8.1.1:
  • INTERFACE

SOURCE

(c) 2007-2013 Scientific Instrument Services, Inc. Licensed under the terms of SIMION 8/8.1. www.simion.com. D.Manura-2007.

version: 20130222

Any comments on this web page? (will be sent to SIS SIMION Support)
[Optional] Your name: email: phone/fax: