I don't know why modulated(200*(index-1)+1, 200*index); will cause index exceeds matrix dimension error.
I want to cut vector modulated into ten thousand components with 200 bits in each.
And it depends on random binary vector with size is num_bit(is 10000 in this case).
num_bit = 10^4;modulated = zeros(1, 200*num_bit); %use 200 plot to describe one symbol
for index = 1:num_bit if messenge(index) == 1 modulated(200*(index-1)+1, 200*index); %modulated(200*(index-1)+1, 200*index) = ones(1, 200);
elseif messenge(index) == 0 %modulated(200*(index-1)+1, 200*index) = zeros(1, 200);
end end
Best Answer