Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can i create a sequence?

1 visualización (últimos 30 días)
Gn Gnk
Gn Gnk el 2 de Nov. de 2019
Cerrada: John D'Errico el 2 de Nov. de 2019
Hello,
i want to create a sequence {xn} , xn ∈ {(±1, ±j)} .I want to create this sequence for n=1 to N=100 .How can i create this in matlab code?
thank you.
  7 comentarios
Adam Danz
Adam Danz el 2 de Nov. de 2019
Editada: Adam Danz el 2 de Nov. de 2019
That helps but the problem is still not defined well enough to offer a definite solution.
xn ∈ {(±1, ±i)} means xn is an element of the set [-1-i, -1+i, 1-i, 1+i].
I don't know how n or N come into play, though.
Here's an idea I'm pulling out of thin air:
% Create a column vector n:N +/- [1 +/-i]
n = 1;
N = 100;
xn = reshape((n:N)' + [-1-i, -1+i, 1-i, 1+i],[],1);
*This uses implicit expansion which requires Matlab r2016b or later.
Gn Gnk
Gn Gnk el 2 de Nov. de 2019
My problem was that i didnt actually understand the expression xn ∈ {(±1, ±i)} but you answered it for me . I suppose that i should create a 4-QAM signal and repeat this for N=100 times starting from n1=1 with a for- loop .
Thank you for your help and the quick response!

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by