Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to exract all the rows who match an specific value in a table?

조회 수: 2 (최근 30일)
Philippe Corner
Philippe Corner 2017년 11월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
If I have this table
a b name
1 2 Juanita
4 5 Felipe
7 9 Juanita
11 4 elizabeth
5 6 Felipe
2 9 Juanita
How could i extract the all the rows who match with Juanita in name, i.e., to obtain this:
a b name
1 2 Juanita
7 9 Juanita
2 9 Juanita

답변 (1개)

Walter Roberson
Walter Roberson 2017년 11월 6일
mask = strcmp(YourTable.Name, 'Juanita');
sub_table = YourTable(mask,:);

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by