MATLAB Answers

Finding the row and column in a cell array!

7 views (last 30 days)
M G
M G on 11 Nov 2011
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

  0 Comments

Sign in to comment.

Accepted Answer

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

  0 Comments

Sign in to comment.

More Answers (0)