Cell comparing logic output

15 visualizzazioni (ultimi 30 giorni)
Sujan
Sujan il 22 Set 2014
Commentato: Sujan il 22 Set 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.

Risposta accettata

Adam
Adam il 22 Set 2014
Modificato: Adam il 22 Set 2014
all( cellfun( @(x,y) isequal( x, y ), cellArray1, cellArray2 ) )
should do the job I think.

Più risposte (0)

Categorie

Scopri di più su Data Type Identification in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by