How to remove the duplicate in the cell array but still keep the array structure?
Mostrar comentarios más antiguos
A={[3 11];[6 5 8];[ 11 5];[5]};
I wonder if there is any way to remove the duplicate numbers in A but still keep the dimension of the cell array? like
A={[3 11];[6 5 8];[];[]};
appreciate your time!
3 comentarios
Kevin Phung
el 14 de Mayo de 2019
how did
A={[3 11];[6 5 8];[ 11 5];[5]};
become
A={[3 11];[6 5 8];[];[]};
Hang Vu
el 15 de Mayo de 2019
Jan
el 15 de Mayo de 2019
@Hang Vu: You forgot to explain, which operation you want to apply. Why does "remove the duplicate in the cell array" produce the output for the shown input? Let me guess:
If a number occurs in an element of the cell, remove it from all subsequent elements.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!