- Write a script named random_walk that computes the averagenumber of integers over 1000 trials for different thresholds,starting at 50, stepping by 10, and ending at 300. Your scriptshould create a vector containing these averages. Note: it may takea couple of minutes for your script to run. Language C++ /matlab
-
For example,
aveCounts = 1.0e+04 *
Columns 1 through 11
0.0077 0.0184 0.0330 0.0522 0.0746 0.1020 0.1355 0.1764 0.2248 0.2781 0.3424
Columns 12 through 22
0.4082 0.4870 0.5780 0.6816 0.7957 0.9165 1.0519 1.2062 1.3754 1.5493 1.7395
Columns 23 through 26
1.9444 2.1580 2.3984 2.6594
Expert Answer
Answer to Write a script named random_walk that computes the average number of integers over 1000 trials for different thresholds…