File Exchange

image thumbnail

Conway Game of Life

version 1.1 (7.71 KB) by

The most simple implementation of the cellular automata game of life



View License

You may input an image or use random initialized values and see the results.
You can change the rules with new rules.
You can control the time.

Do you ave any related question, any suggestions to speed up the code, you are more than welcome. ^_^

Best regards,


Comments and Ratings (4)

Suraj Kamya

Suraj Kamya (view profile)

Nice and simple code! Helps me to learn CLA.
Thank You :)

jacky chen

thanks ,I am learning the CA

Thanks for your comments.
I have updated the zip file to contain the image example.
You can do the following:
1. put any binary image in the same folder.
2. put the image file name in the line :
A=imread('Your_ image_ file_ name.image type');

You should notice that the image is an example, you may put your own initial values matrix which is suiatble for your problem or you may start with a random matrix.



J (view profile)


When i try running your program it comes up with the following error message:

??? Error using ==> imread at 361
File "CA02.JPG" does not exist.

Error in ==> gameoflifedownloaded at 29

What do I have to change in the program to get it to work?




I have added a sample image, but you may change it with your initial states suitable for your problem.

MATLAB Release
MATLAB 7.6 (R2008a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video