产生(0,1)之间的伪随机二进制序列: function[bits] = (numbits) %%%%%%%%%%%%%%numbits是要产生的比特数;bits是二进制序列 bits=randn(1,numbits)<0.5;