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???

 채택된 답변

Christian Heigele
Christian Heigele 2018년 8월 29일

1 개 추천

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

ADC
ADC 2019년 1월 15일
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???

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

태그

질문:

ADC
2018년 8월 29일

댓글:

ADC
2019년 1월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by