What is causing the reshaping error?
Mostrar comentarios más antiguos
I was playing with the number n, and sometime reshape gives an error when it is too small? Can somone help me deduce what is actually going on here?
M = 64;
k = log2(M);
n = 128;
numSamplesPerSymbol = 1;
rng default
dataIn = randi([0 1], n, 1);
stem(dataIn(1:128), 'filled');
title('Random Bits');
xlabel('Bit Index');
ylabel('Binary Value');
dataInMatrix = reshape(dataIn, length(dataIn)/k, k);
dataSymbolsIn = bi2de(dataInMatrix);
% dataSymbolsIn = b2d(dataInMatrix);
figure;
stem(dataSymbolsIn(1:50));
title('RandomYmbols');
xlabel('Symbol Index');
ylabel('Integer Value');
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Language Fundamentals en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!