Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Diffusion Limited Aggregation Matlab Problem

  1. Dec 12, 2009 #1
    1. The problem statement, all variables and given/known data

    Hello, I have this project due for next Friday. I need help. Its on diffusion limited aggregation. A topic which is unfamiliar to me. I know exactly how to do the problem, but I don't know how to code it correctly. Basically I allow a seed particle to be in a location in a 9 x 9 matrix. Another particle is put into this matrix with a random location. basically just have to show that my code gives an image like the usual fractal images.

    2. Relevant equations


    3. The attempt at a solution

    Here's my code for the random walk;

    Is that the correct coding for a random walk and how would I bring the actual dla into this problem. Thanks for anyone's help. It will be greatly appreciated as i'm freaking out and I know that I won't be able to do this.
  2. jcsd
  3. Dec 14, 2009 #2
    It seems okay, seeing as how you are simply using Matlab's randomization to do your own. Just looking ahead, you'll have to figure out what to do if you are at the wall of your matrix.
  4. Dec 14, 2009 #3
    How would you possible code if the particle hits the center one and joins and also if it doesn't and you have to add more?
  5. Dec 14, 2009 #4
    the code you have written is doing literally nothing!
    where's code to plot the particle current position??

    now to incorporate DLA, compare the upcoming position of particle with that of static particles, if it is same as that of the static particle, then stop further motion, if it is not carry on!
    in this life is simpler as you are using a matrix, so just comparing the M(i,j) would do the job...
    All the best
  6. Dec 15, 2009 #5
    Okay, it seems to me like you should make that random walk a function call. You can then also make other function calls that will add, subtract, or keep constant your particle count. I thought that all you were asking about was the random walk. I don't really understand what else you are asking about, you'll have to rephrase it and provide the necessary background information (what you've got, what you're working towards, etc.).
  7. Dec 17, 2009 #6
    Alrighty, i'm not sure if this code for a random walk is good or not but it shows something.

    there's a few problems though, i'm starting the random walk particle at (0,0) but it needs to come into the plane at a random poisition as well. How would I do that? Also I say that the seed particle's position is the same as the random walk one. But it has to land next to it i.e. north, south, east or west so it'll stick on.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook