필터 지우기
필터 지우기

how to search in more than one column?

조회 수: 2 (최근 30일)
Amr Hashem
Amr Hashem 2015년 5월 21일
댓글: Amr Hashem 2015년 7월 29일
how to search by a word in three or four columns if exist record this column
i use a code which search in one column only
so i have to search by the same word three times each time in a different column
i use this code
for E=1:R % from 1 : length of columns
B=~cellfun('isempty',regexp(D,'power')) ; % works good search for power and return 1 or 0
if (B(E) == 1) % if value of array greater than or equal 1
Defs(j)=E; % save its postion (E,1)
j=j+1;
else % save all arrays didn't have 'power' separately
not(k)=E;
k=k+1;
end
end
how to search in many columns?
  댓글 수: 1
Amr Hashem
Amr Hashem 2015년 7월 29일
Here this code search in one column.
I want to modify it to search in many columns,
ex( if the word exist in column 1 or 2 or 3 )

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by