필터 지우기
필터 지우기

how remove words from a cell array

조회 수: 2 (최근 30일)
elisa ewin
elisa ewin 2017년 8월 2일
편집: Stephen23 2017년 8월 2일
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

채택된 답변

Stephen23
Stephen23 2017년 8월 2일
편집: Stephen23 2017년 8월 2일
>> 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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by