Command:

addFacUnif (  
char* name,
long numIntervals,
double** intervals,
char* note
)

What:

Adds a new factor with a uniform distribution to the configuration to be used for the sample generation

Parameters:

name
[char*]
defines the factor's name. It must begin with a letter and can contain only letters and numbers, this parameter cannot be null!
numIntervals
[long]
number of  intervals stored in the intervals matrix
intervals
[
matrix of double precision #]
each row of the matrix contains the left bound, the right bound and the probability value associated with the current interval
note
[char*]
the factor note is optional in Matlab

Return:

error_code [int]: 1 if the operation has occurred without errors, 0 if an error has occurred

Examples:

addFacUnif('fac1',3,[ 1,2,0.4; 2,3,0.3; 3,4,0.3 ],'notefac1')

this command adds a new factor called fac1 with a uniform distribution, three intervals are set with the presented left and right bounds and associated probability

About the distribution:

The density function of the Uniform distribution has the following expression:

uniform

with n number of intervals. RightVali and LeftVali are the extreme values of i-th subinterval so that (RightVali - LeftVali ) > 0 for each i; Weighti is the weight of the i-th subinterval, the sum of all the weights must be equal to 1.

mean value:                                        standard deviation:

uniform                 uniform

All Factor Commands: