- 35
- 0
- 约小于1千字
- 约 10页
- 2021-09-15 发布于天津
- 举报
元胞自动机程序
L=100,中间两位为1,其余为零,迭代100次,做250种时空。
原程序:yubaozdj=zeros(256,8, int8 ); %zeros 为产生 256*8 的矩阵
h=0;
for i1=0:1
for i2=0:1
for i3=0:1
for i4=0:1
for i5=0:1
for i6=0:1
for i7=0:1
h=h+1;
yubaozdj(h,1)=i1;
yubaozdj(h,2)=i2;
yubaozdj(h,3)=i3;
yubaozdj(h,4)=i4;
yubaozdj(h,5)=i5;
yubaozdj(h,6)=i6;
yubaozdj(h,7)=i7;
end
end
end
end
end
end
end
for i=1:256
figure
x=zeros(100,1, in t8 );x(50)=1;x(51)=1;
for p1=1:100
for p2=1:100
if ( x(p2)==1 )
plot(p2,p1, *);
end
end
temp=x(1);
for p3=1:100
temp1=x(p3);
if (p31 p3100)
x(p3)=yubaozdj(i,temp2*4+x(p3)*2+x(p3+1)+1);
elseif (p3==1)
x(1)=yubaozdj(i,x(100)*
原创力文档

文档评论(0)