How to do matrix indexing using for loop that involved sampling at time k?
Afficher commentaires plus anciens
%Designed training sequences x1 and x2
x1 = [1,1,1,0,0,0,0,1,0,1,0,1,1,0,0,1] ;
x2 = [1,1,1,0,1,0,0,0,1,1,1,0,0,0,0,1] ;
x [k] = [ x1[k] , x2[k], ... xM[k] ]^T
X [k] = [x^T[k], x^T[k-1], ..., x^T[k-L+1] , 1]^T
How do i create a matrix x[k] and X[k] that depend on the time k using Matlab? I have trouble indexing such complex vector or matrix. For example, k is in the range of 3<= k <= 16 . For example, x[3] = [ x1[3], x2[3] ]^T which is x3 = [ 1, 1]^T. Here x1[3] means the 3rd element of vector x1 which is the number 1, x2[3] mean the 3rd element of vector x2 which is also a number,1.
x[4] = [ x1[4], x2 [4] ] refer as x[4] = [ 0 , 0 ] so on and so forth
then X [3] will be : X [3] = [ x1[3], x2[3], x1[2], x2[2], x1[1], x2[2], 1 ]^T which is X [3] = [1, 1, 1, 1, 1, 1, 1]^T , the ^T here means tranpose of the vector.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!