How can I remove duplicate values from cell array?

 Respuesta aceptada

Nicolas B.
Nicolas B. el 11 de Nov. de 2019
Editada: Nicolas B. el 11 de Nov. de 2019
Does the function unique() solve your problem?
So in your case, because you have a cell array:
S = {1 2 2 3};
S = num2cell(unique(cell2mat(S)));

Más respuestas (0)

Categorías

Productos

Preguntada:

el 11 de Nov. de 2019

Editada:

el 11 de Nov. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by