Question: This is a MATLAB assignment and I don't understand how to run the simulation X times to create an ensemble. Run this simulation X times
This is a MATLAB assignment and I don't understand how to run the simulation X times to create an ensemble.
Run this simulation X times to generate an ensemble. Record/store the final location of the walker at the end of each simulation in the ensemble.
Generate a histogram for the ending position of the walker for each simulation in the ensemble
Adjust the bin-width to make sense of your results (help histogram)
Repeat and plot results for X = [1000, 2000, 10000, 20000, 100000, 1000000]
This is what I have to far.
for time = [1:1000]; % time data points 1 to 1000
position = rand(1, 1000); % input 1000 position points
comet(time, position); % plot the walker's position
title('Random Walkers Steps');
xlabel('steps');
ylabel('position');
end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
