Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

matlab 2. A random walker is a simple idea: start at some point, and then every time, move in a random direction. In 1-D a

matlab image text in transcribed
2. A random walker is a simple idea: start at some point, and then every time, move in a random direction. In 1-D a random walker step to left or to right, or s/he can stop for a moment. If we are demonstrade step to right with 1, step to left with -1 and if s/he stop that we can demonstrade it with 0. In this question you will write a Matlab function, when user call that function as rw(n), it will createn random steps consist of (1,0,-1). Than it will find the distance list at each random step, and max distance from origin in n random steps, and plot the step number to distance. For example: If my function name is w >>rw(10) create 10 random number include 1,0,-1 Steps as steps = Distance = 1 0 Max distance = 1 Graph as: -1 1 -1 0 0 -1 1 0 1 1 0 0 0 1 0 0 1 08 0.6 0.4 0.2 0 -0.2 -0.6 -0.8 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions