Effacer les filtres
Effacer les filtres

extract array from a matrix

12 vues (au cours des 30 derniers jours)
ADC
ADC le 29 Août 2018
Commenté : ADC le 15 Jan 2019
I need to extract the arrays from a tab that contain an assigned value for instance on the Matrix A take all the rows with contain the value 10 on the first column How Can I Do???

Réponse acceptée

Christian Heigele
Christian Heigele le 29 Août 2018
Logical indexing:
A(A(:,1)==10,:)
That states which rows you want to select: A(:,1)==10 , with A(cond, :) you access all those who are selected.
  1 commentaire
ADC
ADC le 15 Jan 2019
very usefull but it doesn't work if for exsample I've the needed to import data like a table...
I got an error when put the operator ==, is there any other way to do it???

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays 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