部分代码: %CA driver %HPP-gas clear all clf nx=52; ny=100; z=zeros(nx,ny); o=ones(nx,ny); sand=z; sandNew=z; gnd=z; diag1=z; diag2=z; and12=z; or12=z; sums=z; orsum=z; gnd(1:nx,ny-3)=1 ; % right ground line gnd(1:nx,3)=1 ; % left ground line gnd(nx/4:nx/2-2,ny/2)=1; %the hole line gnd(nx/2+2:n