How can I index using cell arrays?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dominik Mattioli
le 8 Fév 2017
Réponse apportée : Guillaume
le 8 Fév 2017
A = randi(100,1,8); % Some array that I want to index into.
B = {[1;2;3];[4;5];[6];[7;8]}; % Cell array with indices.
%I want to index B into A to get:
C = {[A(1);A(2);A(3)];...;[A(7);A(8)]}
0 commentaires
Réponse acceptée
Plus de réponses (0)
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!