Understanding the following step in MATLAB
Mostra commenti meno recenti
Hello all, I came across the following code on MATLAB but not getting its last step:
symbols = randi([0 3], 1, 256);
constellation = [1+1i, -1+1i, -1-1i, 1-1i];
signal = constellation(symbols + 1); % Last step
My query is why " symbols +1 " is written in last step and why not only " symbols".
Any help in this regard will be highly appreciated.
Risposta accettata
Più risposte (1)
The elements in symbols range from 0 - 3, but Matlab uses 1-based indexing, i.e. the indices int0 constellation can only be 1-4.
1 Commento
charu shree
il 5 Lug 2023
Categorie
Scopri di più su Time-Frequency Analysis in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!