File Exchange

image thumbnail


version (2.5 KB) by Wolfgang Schwanghart
sandpile cellular automaton according to Bak & Paczuski


Updated 04 Jan 2008

View License

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.

Comments and Ratings (10)


Dear Liu, I can hardly help you here. Do you have sandpile on a search path or in your working direcotry? Please verify that.

liu wei

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

help sandpile

than copy the lines in the example and paste them. Does that work?

liu wei

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!

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux