Azzera filtri
Azzera filtri

Comparision of two different cell arrays and save in two different matrices?

2 visualizzazioni (ultimi 30 giorni)
Hi i have two cell matrices with sring values as below
a = {'hi';'hello';'hey';'oh';'hello'};
b = {'hi';'hello'};
Comman strigns in one matrix and remaining in another matrix.i need the output as
result1 = {'hi';'hello';'hello'}
result2={'hey';'oh'}
Please let me know if any one knows, Thanks in advance

Risposta accettata

madhan ravi
madhan ravi il 13 Mar 2019
Modificato: madhan ravi il 13 Mar 2019
result1=a(ismember(a,b)).'
result2=a(~ismember(a,b)).'

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by