Question: Problem 2 : Adding Bias for East - to - West Ocean Flow Modify your code from Problem 1 to simulate a scenario where there
Problem : Adding Bias for EasttoWest Ocean Flow
Modify your code from Problem to simulate a scenario where there is a constant easttowest ocean flow. This means that the particle is more likely to move west than in any other direction. You will model this bias by adjusting the probabilities for movement in each direction.
Instructions:
Adjust movement probabilities:
Modify the random movement to reflect the following probabilities:
chance of moving west decrease the x coordinate
chance of moving east increase the coordinate
chance of moving north increase the coordinate
chance of moving south decrease the coordinate
Hint: Use randi to generate a random integer between and using the MATLAB syntax:
direction randi;
Apply the following rules to simulate the biased movement:
If the random number is between and inclusive move west.
If the random number is between and move east.
If the random number is between and move north.
If the random number is between and move south.
Implement the biased random walk:
Adjust your loop from Problem to incorporate the new movement probabilities.
Ensure you update the particle's coordinates accordingly. To ensure the if conditions are implemented correctly, I encourage you to use MATLAB's debugging tool to test the first few iterations.
Plot the biased transport path:
Plot the new path, ensuring the axes are labeled and the title reflects the easttowest flow bias.
Calculate and display the final distance:
Calculate and display the final distance from the starting point, as in Problem
Questions: Provide detailed answers for the questions below.
Compare the transport paths from Problem and Problem How does the bias introduced in Problem affect the overall movement of the particle and the distance traveled?
Based on your simulations, discuss the implications of ocean currents on the spread of microplastic pollution over time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
