Integration using the built-in 'int' command

x = rand(1,N); plot(x(1:200),'.') The x values of the first 200 indices is plotted above. Each xi has a random value between 0 and 1 which is displayed on the y-axis in the left-hand plot. This use of random samples and its relation to the statistics of gambling was the original inspiration for the name Monte Carlo. ................
................