Question
PLEASE HELP ME WITH Q4 MATLAB - I NEED TO UNDERSTAND HOW TO MAKE A PDF USING MATLAB Using a large number of random walks
PLEASE HELP ME WITH Q4 MATLAB - I NEED TO UNDERSTAND HOW TO MAKE A PDF USING MATLAB
Using a large number of random walks (e.g. n = 5000) create histograms of the distance from the origin of the random walkers at three different time points (e.g. t = 100, 200, 300). [Use the same axis limits on the three graphs for easier comparison.]
Matlab hints: use hist() for plotting the histograms; it is useful to explicitly specify the bins (e.g 1:2:50) in the second argument of the hist() command. Use subplot() to create the three plots together in a single figure.
4. (2 marks) Compare graphically the results from part 3. with the theoretical prediction for the probability density function of the distance from the origin p(d) = (2d/t) exp(d 2/t). [Note that the probability density can be converted to a discrete set of frequency of occurrences by multiplying it with the number of random walkers and with the size of the bins used in the histogram.]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started