Effacer les filtres
Effacer les filtres

select certain matrix elements

1 vue (au cours des 30 derniers jours)
zilai si
zilai si le 15 Oct 2019
Modifié(e) : Fabio Freschi le 15 Oct 2019
hello,everyone
i just want to ask how to select eg the 1-10 and 20-30 rows elements in the first column.
like A(1:10 and 20:30,1)

Réponse acceptée

Fabio Freschi
Fabio Freschi le 15 Oct 2019
Modifié(e) : Fabio Freschi le 15 Oct 2019
You can simply concatenate your ranges using square brackets:
A([1:10 20:30],1)

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by