Cell comparing logic output

조회 수: 13 (최근 30일)
Sujan
Sujan 2014년 9월 22일
댓글: Sujan 2014년 9월 22일
Friends,
I want to compare 2 cell arrays and if all characters are similar I want to generate 1 as output and else 0 as the output. but i could not find a simple compare function for cell arrays. pls help me on this ? Thanks in advance.

채택된 답변

Adam
Adam 2014년 9월 22일
편집: Adam 2014년 9월 22일
all( cellfun( @(x,y) isequal( x, y ), cellArray1, cellArray2 ) )
should do the job I think.
  댓글 수: 1
Sujan
Sujan 2014년 9월 22일
It works. awesome. thanks a lot.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by