how remove words from a cell array

3 visualizzazioni (ultimi 30 giorni)
elisa ewin
elisa ewin il 2 Ago 2017
Modificato: Stephen23 il 2 Ago 2017
Hi, I have a cell array A (attached) and I want to delete the words that have the character \.
Example:
A={'past';'life';'amp';'thinks';'hes';'cat\udd\udc';'https\u';'itsyaaboysb';'somebody'};
I want
A={'past';'life';'amp';'thinks';'hes';'itsyaaboysb';'somebody'};
Can you help me? thanks

Risposta accettata

Stephen23
Stephen23 il 2 Ago 2017
Modificato: Stephen23 il 2 Ago 2017
>> A = {'past';'life';'amp';'thinks';'hes';'cat\udd\udc';'https\u';'itsyaaboysb';'somebody'};
>> idx = cellfun('isempty',strfind(A,'\'))
>> B = A(idx)
B =
past
life
amp
thinks
hes
itsyaaboysb
somebody

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by