How can I get specified elements of matrix?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a 1*28800 matrix and I want elements of this matrix which indexes are 10*i+1. How can I get these specified matrix?
for example
a=[1,2,3,4,5,7,8,910,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
I want a(1),a(11),a(21)
How can I code this in matlab?
1 commentaire
Torsten
le 21 Août 2022
Better use
a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
instead of
a=[1,2,3,4,5,7,8,910,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
to check
a(1:10:end)
Réponses (1)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!