Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab 1. Hamming Distance is the measure of the different number of the elements of two binary lists. For example, if you consider the lists
Matlab
1. Hamming Distance is the measure of the different number of the elements of two binary lists. For example, if you consider the lists a = [1,0,1,0,1,1) and b = [1,0,0,1,0,1), you will see that different elements of list a and list b are the 3rd, 4th, 5th. In that case the Hamming distance between a and bis 3. I want you to write the Matlab script that creates two binary (has only O's and 1's) lists randomly with 1000 elements and finds the Hamming distance between them. 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 ramdom 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 0 1 -1 0 1 0 -1 0 0 -1 0 -1 0 0 1 1 1 Steps as steps = 1 Distance = 1 0 Max distance = 1 Graph as: 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 1 1 1 2. 3 4 5 6 7 8 9 10Step 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