Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a script that generates the following 1 D random walk ( 1 0 0 steps ) : each time the position of the marker
Write a script that generates the following D random walk steps: each time the position of the marker changes by or The marker starts its walk at
Write a script to answer the following questions:
What is the final location of the marker assign the result to
What is the total distance travelled by the marker assign the result to ; should be a regular variable and not a vector
Hint: consider using a builtin function called abs for finding the absolute value and thus the travelled distance.
Script
Save
C Reset
MATLAB Documentation
x;
d;
totalsteps ;
k;
;
kN
irandiN
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