return an array (or iarray) r such that where mask[i]==1, r[i]=a[i], otherwise r[i]=b[i].
Construct a new array from elements of x that correspond to where the mask is true. ntrue is an optional parameter equal to the number of true elements of mask. If not given, then pack will count the true elements of mask. Give this parameter if you are using the same mask in multiple pack statements.
Return the running sum of mask.
return [0..size-1]
generate a list of index values, with each number appearing in the list according to the value passed in its position. For example, if x={0,0,1,2,0,1} then the output from this function will be {3,4,4,6}
Perform lognormal variation of the components of a, with
standard error given by s, ie
Perform normal variation of the components of a, with
standard error given by s, ie