Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you make MATLAB solve it? Please, make it visualize in two-dimensional way, as in the example Animation: Brownian motion. Write a function with the

image text in transcribed

Can you make MATLAB solve it? Please, make it visualize in two-dimensional way, as in the example

Animation: Brownian motion. Write a function with the following declaration: brown2D (N). The function takes in a single input N, which is an integer specifying the number of points in the simulation. All the points should initially start at the origin (0,0). Plot all the points on a figure using. markers, and set the axis to be square and have limits from -1 to 1 in both the x and y direction. To simulate Brownian motion of the points, write a 1000-iteration loop which will calculate a new x and y position for each point and will display these new positions as an animation. The new position of each point is obtained by adding a normally distributed random variable with a standard deviation of 0.005 to each x and y value (use randn; if you have 100 points, you need to add 100 distinct random values to the x values and 100 distinct random values to the y values). Each time that the new positions of all the points are calculated, plot them on the figure and pause for 0.01 seconds (it's best to use set and the line object handle in order to update the xdata and ydata properties of the points, as mentioned in lecture). What you will see is a simulation of diffusion, wherein the particles randomly move away from the center of the figure. For example, 100 points look like the figures below at the start, middle, and end of the simulation

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

d . What are common triggers for this condifion?

Answered: 1 week ago

Question

What went well? What could have gone better?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago

Question

The paleolithic age human life, short write up ?

Answered: 1 week ago