how i can reprenst in matlab?

74 vues (au cours des 30 derniers jours)
nikhitha kundarapu
nikhitha kundarapu le 10 Mar 2018
Commenté : Kane le 25 Nov 2025 à 3:52
%%%Preamble in frequency domain as provided in the wimax standard
%%%These are frequency domain 201 values in the order of 100 negative halves, DC and 100 positive
%%%halves
%%%STEP1
Pall= [1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i ...
1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i ...
1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i ...
1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i ...
-1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
-1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i ...
1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i ...
-1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i ...
1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i ...
-1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i ...
-1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i ...
1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 0.0000 + 0.0000i -1.0000 - 1.0000i ...
1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i ...
1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 - 1.0000i ...
-1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 + 1.0000i ...
1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 - 1.0000i ...
-1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i ...
-1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 - 1.0000i ...
1.0000 - 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i ...
-1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i ...
1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i ...
1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i 0.0000 + 0.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 - 1.0000i ...
-1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 - 1.0000i ...
-1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i 1.0000 + 1.0000i ..
1.0000 + 1.0000i 1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i ...
1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i]
  2 commentaires
Tom Tutin
Tom Tutin le 1 Sep 2023
I would also like an answer to this.
Kane
Kane le 20 Nov 2025 à 0:18
same - is there any movement on this?

Connectez-vous pour commenter.

Réponse acceptée

Steven Lord
Steven Lord le 20 Nov 2025 à 6:02
Déplacé(e) : Cris LaPierre le 21 Nov 2025 à 15:54
It's not clear to me what the question is, unless it's "How can I populate a vector with multiple copies of numbers without typing them explicitly?" If that is the question see the repmat or repelem functions or just use multiplication or indexing.
re = [1 1 -1 -1];
im = [1 -1 1 -1];
x = complex(re, im)
x =
1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i
y = repmat(x, 2, 2)
y =
1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i
z = repelem(x, [4 2 5 3])
z =
Columns 1 through 9 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 + 1.0000i Columns 10 through 14 -1.0000 + 1.0000i -1.0000 + 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i -1.0000 - 1.0000i
w = x(ones(3, 3))
w =
1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i 1.0000 + 1.0000i
v = x(2)*ones(4)
v =
1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i 1.0000 - 1.0000i
Depending on what you're planning to do with these numbers later, the cplxpair function may also be of use.
  2 commentaires
Tom Tutin
Tom Tutin le 21 Nov 2025 à 3:56
Déplacé(e) : Cris LaPierre le 21 Nov 2025 à 15:54
That's it! Thanks Steven!
Kane
Kane le 25 Nov 2025 à 3:52
Good Lord! Hes got the answer. I am happy to see it will also work in R2018.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Color and Styling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by