Effacer les filtres
Effacer les filtres

Finding the row and column in a cell array!

1 vue (au cours des 30 derniers jours)
M G
M G le 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

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 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')))

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by