{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

food step - a=size(foodGrid outputGrid=foodGrid...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Laura Hyde %Laurhyde %Eng101, Section 205, Chad Ohlandt %Project 8 %3/3/08 %foodStep.m function outputGrid = foodStep(algaeGrid, foodGrid) %function outputGrid = foodStep(algaeGrid, foodGrid) %Subtracts 10 from the amount of food on cells which contain living algae.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a=size(foodGrid); outputGrid=foodGrid; i=1:length(a)-1 j=1:length(a)-1 if(algaeGrid(i,j)>0) outputGrid(i,j)=foodGrid(i,j)-10; end end end...
View Full Document

{[ snackBarMessage ]}