extract array from a matrix

조회 수: 19 (최근 30일)
ADC
ADC 2018년 8월 29일
댓글: ADC 2019년 1월 15일
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일
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개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by