This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The angle is expressed in radians.
The absolute value of the argument, or of each element of the argument, should be less than or equal to 1.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The argument, or each element of the argument, should be equal to or larger than 1.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The angle is expressed in radians.
The absolute value of the argument, or of each element of the argument, should be less than or equal to 1.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The angle is expressed in radians.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The absolute value of the argument, or of each element of the argument, should be less than 1.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The argument, or all elements of the argument, should be less than 88. The exponential of the argument, or an element of the argument, less than -88 raises an error condition unless the IGNORE-UNDERFLOW option has been set.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The function returns Nill, of type Undefined, if there is no such global variable.
Example:
Global i=1 Do If 'type(global(`SEL_`/string(i)))#`Histogram`' Then Leave Call write_histogram_rz(global(`SEL_`/string(i)),`arrival.rz`) Global i=i+1 Enddo
The ARRIVAL-TIME-DISTRIBUTION command can create a set of histograms which are numbered SEL_1, SEL_2 etc. These histograms are written to an RZ file by the above set of instructions. The TYPE and GLOBAL functions are used to stop the loop as soon as the last histogram has been written.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The argument, or each element of the argument, should be larger than 0.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
When given an Histogram, it will return the coordinate of the upper edge for the last bin. Using this function with an Histogram is equivalent to calling the INQUIRE_HISTOGRAM procedure and using its maximum argument.
When given a Matrix as argument, it will return the largest value found in the Matrix.
The function returns in either case a value of type Number.
Using this function with an Histogram is equivalent to calling the INQUIRE_HISTOGRAM procedure and using its mean argument.
This function accepts Matrices with any number of dimensions.
The mean is for both Histograms and Matrices defined as:
Sum(x) mean = ------ n
The function returns in either case a value of type Number.
Example:
See the RMS function.
When given an Histogram, it will return the coordinate of the lower edge for the first bin. Using this function with an Histogram is equivalent to calling the INQUIRE_HISTOGRAM procedure and using its minimum argument.
When given a Matrix as argument, it will return the smallest value found in the Matrix.
The function returns in either case a value of type Number.
The function takes a Logical are argument and returns a Logical.
If the argument is a String, it should contain a simple number, not an expression.
If the argument is a Matrix, then its first element will be returned.
The function returns in either case a value of type Number.
This is the reverse operation of the REF_HISTOGRAM, REF_MATRIX and REF_STRING.
Internally however, the bookkeeping of histograms and of global variables are separated, and it is common that histograms exist which have no associated global. In the rare event that one wishes to access these histograms one uses REF_HISTOGRAM.
REF_HISTOGRAM takes a Number as argument which is interpreted as the number of the histogram in the histogram buffer. The numbers of the histograms can be found in the first column of the output of the LIST_HISTOGRAMS procedure.
Example:
Call delete_histograms Call book_histogram(a,25,`integer`) For i From 1 To 10000 Do Call fill_histogram(a,rnd_poisson(3)) Enddo Call plot_histogram(ref_histogram(1)) Call plot_end
By first calling DELETE_HISTOGRAM, we are sure that the next histogram to be booked will have number 1. This histogram is in this case also known as A. It is filled and then plotted, using its number rather than its associated global.
Such access is rarely required since all user-relevant Matrices can in principle be accessed via a Global variable.
Such access is rarely required since all user-relevant Strings can in principle be accessed via a Global variable.
Using this function with an Histogram is equivalent to calling the INQUIRE_HISTOGRAM procedure and using its rms argument.
This function accepts Matrices with any number of dimensions.
The RMS is for both Histograms and Matrices defined as:
2 2 2 Sum(x ) - Sum (x)/n RMS = ------------------- n
The function returns in either case a value of type Number.
Example:
Call book_histogram(a,100) Call book_matrix(b,10000) For i From 1 To 10000 Do Global entry=rnd_gauss Call fill_histogram(a,entry) Global b[i]=entry Enddo Say "Histogram mean: {mean(a)}, rms: {rms(a)}" Say "Matrix mean: {mean(b)}, rms: {rms(b)}"
A test to verify that the mean and RMS for matrices and histograms coincide. This should be numerically exact since the mean and RMS for histograms are computed from the entries, not from the bin contents.
The optional argument specifies the mean (and the standard deviation) of the distribution to be generated. If the argument is omitted, a mean of 1 is assumed.
The mean is usually specified as a Number but may also be of type Histogram and Matrix. In the latter two cases, variables of the same type will be returned, taking for each output element as mean the corresponding element of the argument.
A random number sequences according to only one function can be generated at the time.
This generator has no arguments.
This function has no arguments.
This function has no arguments.
Separate random number sequences according to different histograms can be generated concurrently.
The procedure works by creating a cumulative histogram and reverse-interpolating it for a uniformly distributed random number. Failures can occur for the following reasons:
The argument is mandatory.
The optional argument specifies the mean of the distribution to be generated. If the argument is omitted, a mean of 1 is assumed.
This procedure calls the CERN library routine RNPSSN.
The mean is usually specified as a Number but may also be of type Histogram and Matrix. In the latter two cases, variables of the same type will be returned, taking for each output element as mean the corresponding element of the argument.
The argument specifies the theta parameter of the distribution to be generated. If the argument is omitted, a theta of 1 is assumed.
This procedure calls the CERN library routine RNGAMA.
The theta parameter is usually specified as a Number but may also be of type Histogram and Matrix. In the latter two cases, variables of the same type will be returned, taking for each output element as theta the corresponding element of the argument.
This procedure calls the CERN library routine RANLUX.
The scaling factor is usually specified as a Number but may also be of type Histogram and Matrix. In the latter two cases, variables of the same type will be returned, taking for each output element as mean the corresponding element of the argument.
[The default scaling factor is 1.]
The argument n is mandatory and should be of type Number.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The argument, or each element of the argument, should be equal to or larger than 0.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
The STRING function is for instance used to create file names that depend on parameters of the chamber being studied:
Global argon 70 Global co2 30 Global gas_file `Argon_`/string(argon)/`_CO2_`/string(co2)/`.gas` Call inquire_file(gas_file,exist) If exist Then get {gas_file} Else write {gas_file} magboltz argon {argon} co2 {co2} Endif
The function returns in either case a value of type Number.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function can take either an Histogram, a Matrix or a Number as argument. The function acts bin-by-bin on Histograms and element-by-element on Matrices and returns a value of the same type as the argument.
This function provides a functionality which is similar to the INQUIRE_TYPE procedure. The main difference is that it is permissible to give the INQUIRE_TYPE procedure as first argument a variable that does not yet exist while this is not allowed with the TYPE function. The reason for this is that the arguments of procedures are automatically declared if they do not yet exist, while the arguments of functions must be existing variables. If you wish to use the TYPE function and are not sure the variable exists, then use the GLOBAL function".
Examples:
Global a `Hello !` Say {type(a)} Say {type(global(`A`))}Say {type(global(`does not exist`))}
Both Say statements in the first example will display "String", which is the type the variable A gets by executing the Global statement.
The argument of the GLOBAL function in the second example is not a valid name for a global variable, GLOBAL will therefore return NILL, which is of type Undefined.
Formatted on 15/01/01 at 23:07.