How to plot concentration vs time plot for changing concentrations?

조회 수: 5 (최근 30일)
oshawcole
oshawcole 2017년 11월 24일
댓글: Walter Roberson 2017년 11월 24일
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
oshawcole
oshawcole 2017년 11월 24일
Random number generated using rand
Walter Roberson
Walter Roberson 2017년 11월 24일
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개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by