Normal
Fill vector with pseudorandom numbers from a normal distribution.
BOOL Normal( int nSize, int nSeed = 0 )
Returns TRUE on success or FALSE on failure.
EX1
void vectorbase_Normal_ex1() { // Declare a vector of size 20 vector vec(20); // Fill with normal random numbers BOOL bRet = vec.Normal(vec.GetSize()); // Output the values for( int ii=0; ii<vec.GetSize(); ii++ ) printf("vec[%d]=%f\n", ii, vec[ii]) }
Fill vector with pseudorandom numbers from a normal distribution with zero mean and unit standard deviation. This method is similar to the LabTalk Normal function.
If this method is used on an integer vector, then the resulting vector will be filled with nearest integers from the distribution with typical values betwen -3 and 3.
origin.h