% DiffusionProcess1.m uses a coin-tossing process to simulate % a particle moving back and forth between two compartments % % When the particle is in the left box, it has probability R % of moving to the right. When it is in the right box, it has % probability L of moving to the left. % parameters R=0.3; L=0.1; % time interval tmax=250; % initialize vectors storing the results over time Boxnow=1; Boxt=1; tvals=0; t=0; while t