Matlab: Cellular Automata Class