Borrar filtros
Borrar filtros

Union of cell matrix

4 visualizaciones (últimos 30 días)
raj singh
raj singh el 8 de Jun. de 2016
Comentada: raj singh el 9 de Jun. de 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

Respuesta aceptada

KSSV
KSSV el 8 de Jun. de 2016
unique(cell2mat(A))

Más respuestas (1)

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

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by