Matlab 256-Qam Inphase values remains at -15 whiles the Quadrature values change

55 Views Asked by At

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.

1

There are 1 best solutions below

0
Luis Mendo On

With 256-QAM, the range of possible input values is from 0 to 255. In your code you are only using values from 3 to 10, all of which happen to have an in-phase component equal to -15.

So, to see the full constellation you can define

data = 0:255;

Using this in your code yields

enter image description here