Cell comparing logic output

15 ビュー (過去 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 Center および File ExchangeData Type Identification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by