Cell comparing logic output

13 Ansichten (letzte 30 Tage)
Sujan
Sujan am 22 Sep. 2014
Kommentiert: Sujan am 22 Sep. 2014
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.

Akzeptierte Antwort

Adam
Adam am 22 Sep. 2014
Bearbeitet: Adam am 22 Sep. 2014
all( cellfun( @(x,y) isequal( x, y ), cellArray1, cellArray2 ) )
should do the job I think.
  1 Kommentar
Sujan
Sujan am 22 Sep. 2014
It works. awesome. thanks a lot.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Identification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by