Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Distfun details
Login with GitLab

Distfun

Distribution functions
(39490 downloads for this version - 115951 downloads for all versions)
Details
Version
1.1.1
Authors
Michael Baudin
Prateek Papriwal
Pierre Lecuyer
Luc Devroye
Jean-Philippe Chancelier
Michael A. Malcolm
Cleve B. Moler
George Marsaglia
Arif Zaman
Barry W. Brown
Owner Organization
Scilab Enterprises
Maintainers
S G
Vincent COUVERT
prateek papriwal
Michael BAUDIN
Stéphane MOTTELET
License
Dependencies
Creation Date
December 13, 2016
Source created on
Scilab 6.0.x
Binaries available on
Scilab 6.0.x:
Windows 64-bit Linux 64-bit
Scilab 6.1.x:
Windows 64-bit macOS Linux 64-bit
Scilab 2023.0.x:
Windows 64-bit
Scilab 2024.0.x:
Linux 64-bit Windows 64-bit macOS
Scilab 2025.0.x:
Windows 64-bit
Install command
--> atomsInstall("distfun")
Description
            The goal of this toolbox is to provide accurate distribution functions. 
The provided functions are designed to be compatible with Matlab.

The goals of this toolbox are the following.
 * All functions are tested with tables (actually, csv datasets).
   The tests includes accuracy tests, so that the accuracy 
   should by from 13 to 15 significant digits in most cases.
 * For each distribution, we have 
   * the probability distribution function (PDF)
   * the cumulated distribution function (CDF)
   * the inverse CDF
   * the random number generator
   * the statistics (mean and variance)
 * The CDF provides the upper and the lower tail of the 
   distribution, for accuracy reasons. 
 * The uniform random numbers are of high quality.
   The default is to use the Mersenne-Twister generator.   
 * Each function has a consistent help page.
   This removes confusions in the meaning 
   of the parameters and clarifies the differences 
   with other computing languages (e.g. R).
   
The design is similar to Matlab's distribution functions. 
A significant difference with Matlab's function is that both 
the upper and lower tails are available in "distfun", while 
Matlab only provides the lower tail. 
Hence, "distfun" should provide a better accuracy when 
probabilities close to 1 are computed (e.g. p=0.9999). 

There are many interesting, positive, differences with Scilab, Stixbox, or other
tools. For a full set of motivations, please read :

http://forge.scilab.org/index.php/p/distfun/
   
Features
--------

For each distribution x, we provide five functions :
 * distfun_xcdf : x CDF
 * distfun_xinv : x Inverse CDF
 * distfun_xpdf : x PDF
 * distfun_xrnd : x random numbers
 * distfun_xstat : x mean and variance

Distributions available :
 * Beta (with x=beta)
 * Binomial (with x=bino)
 * Chi-Squared (with x=chi2)
 * Extreme Value (with x=ev)
 * Exponential (with x=exp)
 * F (with x=f)
 * Gamma (with x=gam)
 * Geometric (with x=geo)
 * Histogram (with x=histo)
 * Hypergeometric (with x=hyge)
 * Kolmogorov-Smirnov (with x=ks)
 * LogNormal (with x=logn)
 * LogUniform (with x=logu)
 * Multinomial (with x=mn)
 * Multivariate Normal (with x=mvn)
 * Negative Binomial (with x=nbin)
 * Noncentral F (with x=ncf)
 * Noncentral T (with x=nct)
 * Noncentral Chi-Squared (with x=ncx2)
 * Normal (with x=norm)
 * Poisson (with x=poi)
 * T (with x=t)
 * Truncated Normal (with x=tnorm)
 * Uniform Discrete (with x=unid)
 * Uniform (with x=unif)
 * Weibull (with x=wbl)

Tutorial
 * dispfun_tutorial : A tutorial of the Distfun toolbox.
 * dispfun_plots : A collection of distribution function plots.

Support
 * distfun_betainc : Regularized Incomplete Beta function
 * distfun_erfcinv : Inverse erfc function
 * distfun_gammainc : Regularized incomplete Gamma function
 * distfun_genericpdf : Compute the PDF from the CDF.
 * distfun_getpath : Returns path of current module
 * distfun_histocreate : Creates an histogram
 * distfun_inthisto : Discrete histogram
 * distfun_permrnd : Random permutation
 * distfun_plotintcdf :  Plots an integer CDF
 * distfun_verboseset : Set verbose mode.

Weibull fitting
 * distfun_wblfit : Weibull parameter estimates
 * distfun_wblfitmm : Weibull parameter estimates with method of moments
 * distfun_wbllike : Weibull negative log-likelihood
 * distfun_wblplot : Weibull plot

Other fitting functions
 * distfun_uniffitmm : Uniform parameter estimates with method of moments
 * distfun_betafitmm : Beta parameter estimates with method of moments
 * distfun_gamfitmm : Gamma parameter estimates with method of moments

Random Number Generator
 * rng_overview : An overview of the Random Number Generators of the Distfun
toolbox.
 * distfun_genget : Get the current random number generator
 * distfun_genset : Set the current random number generator
 * distfun_seedget : Get the current state of the current random number
generator
 * distfun_seedset : Set the current state of the current random number
generator
 * distfun_streamget : Get the current stream
 * distfun_streaminit : Initializes the current stream
 * distfun_streamset : Set the current stream

Multivariate vectors
 * distfun_vectorrnd : Random vectors.
            
Files (11)
[3.70 MB]
Windows 64-bit binary for Scilab 2023.0.x

[1.70 MB]
Windows 64-bit binary for Scilab 6.1.x

[1.70 MB]
Source code archive

[2.98 MB]
Linux 64-bit binary for Scilab 2024.0.x

[5.29 MB]
Windows 64-bit binary for Scilab 2024.0.x

[3.14 MB]
macOS binary for Scilab 2024.0.x

[5.30 MB]
Windows 64-bit binary for Scilab 2025.0.x

[2.74 MB]
Windows 64-bit binary for Scilab 6.0.x
Windows version (x64)
Automatically generated by the ATOMS compilation chain

[2.00 MB]
Linux 64-bit binary for Scilab 6.0.x
Linux version (x86_64)
Automatically generated by the ATOMS compilation chain

[2.90 MB]
macOS binary for Scilab 6.1.x

[3.00 MB]
Linux 64-bit binary for Scilab 6.1.x

News (0)
Comments (3)     Leave a comment 
Comment from Hibr List -- March 23, 2019, 11:33:25 PM    
On macOS (10.12 Sierra) and Scilab 6.0.1 I can compile distfun but I cannot install it w/
atomsUnstall. I get the error (German): 

atomsDESCRIPTIONread: die Datei
'/Applications/scilab-6.0.1.app/Contents/MacOS/share/scilab/.atoms/tmp_1553379758/distfun/DESCRIPTION'
existiert nicht.

Means it missed the DESCRIPTION file. This is a problem I faced w/ some other toolboxes w/
Scilab 6.0.1. On another toolbox I created the file manually but it did not solved the
problem. Is that a 6.0.1 issue on macOS?
Comment from Hani Ibrahim -- November 11, 2019, 07:56:05 PM    
Distfun for macOS
=================
For macOS user I compiled Distfun 1.1.1 for macOS. You can download it at
hani-ibrahim.de/public/scilab/

Install it via -->
atomsInstall("~/Downloads/distfun-1.1.1_6.0-bin.x86_64.darwin.zip")

You may need to adjust the path. Works for me on macOS Mojawe (10.14) and Scilab 6.0.2.

Have fun.
Comment from S G -- May 30, 2023, 05:47:53 PM    
distfun-1.1.1 is recompiled and released for Scilab 2023 on Windows, but i get an 
installation error with 2023.1 (as already reported for 2023.0 @ 
https://gitlab.com/scilab/scilab/-/issues/16961
):

--> atomsInstall distfun
atomsInstall : Erreur pendant la création du répertoire
'WSCI\contrib\distfun\1.1.1\'.
à la ligne    52 de la fonction atomsError   ( 
WSCI\modules\atoms\macros\atoms_internals\atomsError.sci ligne 66 )
à la ligne   358 de la fonction atomsInstall ( WSCI\modules\atoms\macros\atomsInstall.sci

ligne 374 )

Could anyone confirm?
Thanks
Answer from S G -- May 30, 2023, 05:51:02 PM    
When i install dependencies by hand, and run distfun's loader.sce also by hand, all is

right and runs.
So it's really an installer's issue.
Answer from S G -- May 30, 2023, 06:22:15 PM    
The patch proposed for atomsInstall() @ 
https://gitlab.com/scilab/scilab/-/merge_requests/295
is also efficient for Scilab 2023.1

With it, distfun is well installed with all its dependencies
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.