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