Elementary Cellular Automata

版本 1.1.0.0 (2.6 KB) 作者: David Young
Simulates any 1D nearest-neighbour binary cellular automaton.
4.6K 次下载
更新时间 2010/3/15

查看许可证

There are 256 elementary cellular automata, where "elementary" means that there is a single row of cells, with binary values, and update rules that depend only on nearest-neighbour interactions. They are described at http://mathworld.wolfram.com/ElementaryCellularAutomaton.html

Our artist in residence asked if anyone had a program that would generate the patterns produced by these simple automata. I said it would only take a few minutes to write one in Matlab. Here's the result. It demonstrates the use of sub2ind to write very compact code.

In this function, the width of the pattern (the length of the array of cells) may be restricted, in which case the 1D array is taken to be circular to determine the states of the end elements. Random noise may also be added to the processing if required.

引用格式

David Young (2024). Elementary Cellular Automata (https://www.mathworks.com/matlabcentral/fileexchange/26929-elementary-cellular-automata), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

启发作品: EternalTime/CellularAutomata

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Arguments now checked using validateattributes instead of custom functions. Example added to comments.

1.0.0.0