vector预分配内存溢出导致原始的 迭代器 失效 consider what happens when you add the one additional object that causes the vector to reallocate storage and move it elsewhere. The iterator’s pointer is now pointing off into nowhere: This illustrates the concept of iterat
for i=1:length(enc_out_data) data_bits_temp=dec2bin(enc_out_data(i),8); databits((i-1)*8+1:i*8)=double(data_bits_temp)-48; end 其中,enc_out_data中存储的是十进制的编码后数据.程序的目的是将这个字节构成的数组转化为比特流数组. 字节数组的大小为512字节,转换之后的databits数组共有4096个比特. clear all clc; a=[1,2,3,10]