FUNCTIONS

length(x) number of elements in vector x. log(x) natural logarithm of x. log10(x) base 10 logarithm of x. max(x) maximum element of vector x. mean(x) mean value of elements in vector x. min(x) minimum element in vector x. pow2(x) 2x. prod(x) product of the elements of x. rand pseudo-random number in the interval [0, 1). The value

returned is pseudo-random rather than truly random in the sense that there is an algorithm that determines rand from the initial “seed.” The same seed will generate the same “random” sequence (see Chapter 15 for howto seed rand by looking in the index).

Sign up to vote on this title
UsefulNot useful