GENERATE

inc_and_npts

 Syntax:  GENERATE x min inc ,, npts

 If the increment and the number of points are given, the formula:
 x[i] = min + (i-1)*inc   for   1 <= i <= npts   is applied directly.
 For example, after the command:  GENERATE X -1 .5 ,, 4
 X = [-1; -0.5; 0; 0.5]

max_and_npts

 Syntax:  GENERATE x min ,, max npts

 If maximum value and the number of points are given, the increment is
 calculated:  inc = ( max - min )/( npts - 1 )
 and then the formula:   x[i] = min + (i-1)*inc   for   1 <= i <= npts
 For example, after the command:  GENERATE X -1 ,, 2 4
 X = [-1; 0; 1; 2]

inc_and_max

 Syntax:  GENERATE x min inc max

 If the increment and the maximum value are given, the number of points
 will be ignored. The formula: x[i] = min + (i-1)*inc   for i=[1;2;3;...]
 will be applied until the next value would be greater than the specified
 maximum. If the calculated maximum is different than the given maximum,
 a warning message will be displayed on the terminal screen. The calculated
 maximum will be the last value stored in the vector.

Additional Information on:

  • example
  • RANDOM

     Syntax:  GENERATE\RANDOM x min max npts
    
     If the \RANDOM qualifier is used, x will be filled with npts random
     numbers that fall between min and max. No increment should be given.
     For example, after the command:  GENERATE\RANDON X 1 2 5
     X = [1.198525; 1.897874; 1.238289; 1.367985; 1.381705]