The document provides code to calculate values in a frontier matrix based on averaging the values of neighboring cells, and initializes a 9x14 matrix A with specific non-zero values at the edges to represent resources available on a frontier.
The document provides code to calculate values in a frontier matrix based on averaging the values of neighboring cells, and initializes a 9x14 matrix A with specific non-zero values at the edges to represent resources available on a frontier.
The document provides code to calculate values in a frontier matrix based on averaging the values of neighboring cells, and initializes a 9x14 matrix A with specific non-zero values at the edges to represent resources available on a frontier.
A=zeros(9,14); for k=1:9 for n=1:14 A(k,n)=0; if k==1 A(k,n)=1000; end if k==3 & n==1 A(k,n)=500; end if k==3 & n==14 A(k,n)=500; end if k==5 & n==1 A(k,n)=0; end end end;