# We Helped With This MATLAB Programming Assignment: Have A Similar One?

SOLVED
Category Programming MATLAB Undergraduate Solved Pay For Matlab Homework

## Short Assignment Requirements

(Random walk simulation, 20pts) Perform MATLAB simulation for random walks by using a random number generator (â€˜randâ€™). We consider an ensemble of 1000 particles. Each particle starts at the origin and takes a step size of 2 every unit time. The probability of each forward or backward step is given by 1/2 and the total number of steps each particle takes is 1000. Perform your simulation and answer following questions. Submit your code (for each line, add detailed explanation) as well as figures. 1. Provide a single plot of position vs time for 5 particles whose colors are labeled differently. 2. Fit the distribution of particle positions after 1000th step with Gaussian distribution and see if the Gaussian describes the particle distribution well as problem 3-5 say. (Submit a histogram of the particle distribution overlaid by the fitted Gaussian curve). 3. Compute the variance of the particle positions for each time point and plot it as a function of time. What is the shape of the curve? Extract the diffusion constant by fitting. Does the diffusion constant from your fit is similar to what you impose in your simulation? 4. Perform 2D simulation and submit a few example trajectories.

## Assignment Image

6-9. (Random walk simulation, 20pts) Perform MATLAB simulation for random walks by using a random number generator ('rand'). We consider an ensemble of 1000 particles. Each particle starts at the origin and takes a step size of 2 every unit time. The probability of each forward or backward step is given by 1/2 and the total number of steps each particle takes is 1000. Perform your simulation and answer following questions. Submit your code (for each line, add detailed explanation) as well as figures. 6. Provide a single plot of position vs time for 5 particles whose colors are labeled differently. 7. Fit the distribution of particle positions after 1000th step with Gaussian distribution and see if the Gaussian describes the particle distribution well as problem 3-5 say. (Submit a histogram of the particle distribution overlaid by the fitted Gaussian curve). 8. Compute the variance of the particle positions for each time point and plot it as a function of time. What is the shape of the curve? Extract the diffusion constant by fitting. Does the diffusion constant from your fit is similar to what you impose in your simulation? 9. Perform 2D simulation and submit a few example trajectories.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On