You are a guest. Restricted access. Read more

Random numbers

You can create vectors and matricies with random numbers using the major distributions. Look at the package random_numbers for the description of various random-number generators.

For example, let us create a vector and a matrix with the random numbers distributed in accordance with a Poisson distribution (assuming the mean 2):


v=poisson_rnd(2,10)   % create vector with 10 elements 
m=poisson_rnd(2,10,3) % create matrix 10x3
printf('%f',m)        % print

Learn how to graph these random numbers using histograms (“density plots”) in the next section.

jmathlab/statistics/random_numbers.txt · Last modified: 2013/04/14 16:52 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0