Finding the row and column in a cell array!

조회 수: 1 (최근 30일)
M G
M G 2011년 11월 11일
Hey everybody,
a={'Mk1326=Scanner,Scan'; 'Mk1327=Scanner,Scan';'Mk1328=Scan';'0,26685,1,0';'Mk1329=SyncStatus,Sync';'Mk1330=Scanner,Scan'};
How can I extract the row and column that only contains 'Scanner' in it?
Thanks in advance, Mehdi

채택된 답변

Andrei Bobrov
Andrei Bobrov 2011년 11월 11일
a={'Mk1326=Scanner,Scan'; 'Mk1327=Scanner,Scan';'Mk1328=Scan';'0,26685,1,0';'Mk1329=SyncStatus,Sync';}
out = a(~cellfun('isempty',regexp(a,'Scanner')))

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by