Hey there matlab gurus. I am a neurodynamics grad student at UCSD, and I've recently become interested in modeling surface diffusion of receptor particles. I've found that matlab is a great tool for the job, however I'm trying to tackle this problem with very limited knowledge of diffusion principles. I've also not taken courses on differential equations, which may be reflected in my code being unnecessarily long. I was hoping someone here could provide some insight.
I've written a script (attached) to simulate basic 2D brownian motion. Furthermore, the 2D surface includes two specialized surface areas that alter particle diffusion rate:
However, including these two subregions was tedious, and it would be a headache to scale this up to include N-number of these specialized regions. I'm wondering if theres an easier way to do this, perhaps even a drawing like the pdetool. One of my goals is to make the specialized regions inside the field be a maze, where the particle would have to bounce through the maze until it reaches an outlet. Given my current methods, this would be extremely arduous. Making dots bounce around inside boxes has been done since the 70s, so I'm guessing there is a streamlined solution out there.
The last thing I want to do is simulate particle diffusion on a curved surface like so:
This seems like a much more complex task, and don't even know where to begin. So again, any insight is appreciated!
Edit -- I don't see where the code attaches, so just in case: