Question: THIS QUESTION IS ON CELLULAR AUTOMATA for an introductory coding course for biologists and we use MATLAB A) Write a function to build the one-dimensional

THIS QUESTION IS ON CELLULAR AUTOMATA for an introductory coding course for biologists and we use MATLAB

A) Write a function to build the one-dimensional CA from the background notes and display the results of each iteration on the same figure in successive rows. The function should take the number of columns of the row of cells, and the number of simulation steps as input parameters.

1) Set up cell states in a matrix and initialize all cells to state 0, except the middle cell which should be in state 1.

2) For each time step, set up a loop to draw each cell (number of cells should be an input parameter of the function) and determine the cells state based on the rules of the CA: A cell in state 1 will be in state 0 at the next step. A cell in state 0 will be in state 1 at the next step if it has exactly one neighbour in state 1, otherwise it will remain in state 0.

B) Change the function so that an input parameter specifies which cells are initially in state 0 and which cells are initially in state 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!