All problems must be in a single *.m file. You may need an additional files for a functions or class definitions. Make a separate block in the code for each problem. Do not submit individual files for each problem. See previous solutions.
The Maxwell-Boltzmann distribution describes the distribution of particle energies, velocities, or speeds in an ideal gas. The velocity distribution for each Cartesian dimension is a Gaussian distribution with
For particles, draw velocity components from this distribution. Use the result to calculate the speed and energy of each particle. Use histograms and overlayed plots to show that the speed and energy distribution of your particles match
respectively. Use Nitrogen at STP for your calculations. Plots should have units indicated.
Use the Inversion method to generate random numbers from the standard () Normal distribution using 'rand'. Convince the grader it is working using a histogram. Hint: 'help erf'
A simple, and somewhat accuate method for generating random numbers from the standard normal distibution makes use of the Central Limit Theorem. Show
produces numbers similar to randn(). Why does this work? What is the variance of a uniform distibution on 0 to 1? Hint:
On average, a particular constant-rate process generates 4 events. What percentage of the time does it produce exactly 4 events?
Generate a 3D random walk and show the results using 'plot3'.