I have a vector of integers I am parsing a qam modulator in matlab using the qammod command, however I noticed when i plot the graph the quadrature part changes but the in-phase part remains at -15. This happens no matter what i change in the input.
Can anyone help or offer an explanation.
`clc
data = [3, 4, 5, 6, 7, 8, 9, 10];
% Modulate using 256-QAM
M = 256; % QAM order
symbols = qammod(data, M);
disp('QAM Symbols (I and Q):');
disp(symbols);
% Plot the QAM constellation
figure;
plot(real(symbols), imag(symbols), 'o');
title('256-QAM Constellation');
xlabel('I (In-phase)');
ylabel('Q (Quadrature)');
grid on;
axis square;`
I have tried changing the figures and even gone through the documentation, but I don't see what the issue is.
With 256-QAM, the range of possible input values is from
0to255. In your code you are only using values from3to10, all of which happen to have an in-phase component equal to-15.So, to see the full constellation you can define
Using this in your code yields