필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

i have a big matrix with dimension 303*14 i want compare every row of this matrix with one vector with dimension 1*14

조회 수: 1 (최근 30일)
i have a big matrix with dimension 303*14 i want compare every row of this matrix with one vector with dimension 1*14 all of these are cell arrays and contain string
  댓글 수: 6
Jan
Jan 2013년 12월 22일
In opposite to your question, the example data do not contain strings, but scalar numbers. This is confusing.
"Doesn't work" is not precise enough to offer a suggestion for improvements. Perhaps it is only a typo in "strcomp", which is written without "o"? Posting the error message would be more helpful.

답변 (1개)

Wayne King
Wayne King 2013년 12월 22일
편집: Wayne King 2013년 12월 22일
I'm not sure I understand, you say you have a cell array:
strcmp() does work element by element on a cell array.
A = {'This is a frog'; 'This is a chair'; 'This is a book'; 'This is a test'};
strcmp(A,'This is a test')

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by