How to plot concentration vs time plot for changing concentrations?

A rod of 10 cm has 20 particles located at the center of the rod. The diffusion begins from the center and the particles go towards left and right. How to plot the concentration of particles at the center of the rod at different times? time=10 minutes. So at the end of every minute, there will be different number of particles at the center. The particles displaces with the following formula: x(t+dt)=x(t)+rD*dt where r is a random number and D=0.1, dt=10 sec (stepsize) It is a one dimensional diffusion. Thank you in advance.

댓글 수: 5

Read about Scatter
oshawcole
oshawcole 2017년 11월 24일
편집: oshawcole 2017년 11월 24일
Please explain more, I am not able to figure out as I am really new to MATLAB.
What is r in the above expression? It is a random number conveying what?
Random number generated using rand
If the random number is generated using rand() and is not scaled or shifted, then the particles can only move in the positive direction, contradicting the question requirement that the particles go left and right.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

태그

질문:

2017년 11월 24일

댓글:

2017년 11월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by