How to calculate qammod for discrete time using for-loop?

1 view (last 30 days)
Hello,i want to use the function qammod to create a 4-QAM signal.
I want to create 4-QAM for the signal y[k] ,k=1,...N (N=100) . The code is for qammod is simple:
M = 4;
x = (0:M-1)';
y = qammod(x,M);
scatterplot(y)
I want to run this for the length of k , so i use for-loop (for i=1:length(k)) .But when i try to find:
y(i) = qammod(x,M);
i keep getting the message :In an assignment A(I) = B, the number of elements in B and I must be the same .
Can anyone help me with this for loop?
Thank you.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!