Filter löschen
Filter löschen

Union of cell matrix

4 Ansichten (letzte 30 Tage)
raj singh
raj singh am 8 Jun. 2016
Kommentiert: raj singh am 9 Jun. 2016
I have a cell matrix
A={[1 2 3] [2 8] [9 2 5]};
I want unique value or union of A.
The solution should be like this = [1 2 3 5 8 9]
Please give me the

Akzeptierte Antwort

KSSV
KSSV am 8 Jun. 2016
unique(cell2mat(A))

Weitere Antworten (1)

Stephen23
Stephen23 am 8 Jun. 2016
>> A={[1 2 3] [2 8] [9 2 5]};
>> unique([A{:}])
ans =
1 2 3 5 8 9

Kategorien

Mehr zu Matrices and Arrays 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