Reduced complexity, cellular automaton model (CA) of a sandpile on a 2-dimensional grid. Each time step a sandgrain is added to a random location on the grid. When the critical number of grains in a cell exceeds 3 all grains in the cell are turned to the 4 neighbors (v. Neumann Neighborhood). This avalanche may prograde and trigger even more avalanches. After a while the sandpile comes to a state of self-organized criticality.
Dear Liu, I can hardly help you here. Do you have sandpile on a search path or in your working direcotry? Please verify that.
It still didn't work!And there is no "sandpile" in the matlab?What I can do now ?Thank you !
The error says all: Don't use the function definition in the prompt. Please try following: Type in the command window
than copy the lines in the example and paste them. Does that work?
Why it can't run?And Matlab say"??? function [nrgrains,nrout,avsize] = sandpile(siz,nrsteps)
Error: Function definitions are not permitted at the prompt or in scripts.
".Please give me a hand!Thank you very much!