Deleting sepecific character from cell array
Mostrar comentarios más antiguos
Hi Helpers,
I have a cell array in which some cell has " that I would like to delete such as, '"22000' or '"contig_2012'. (I want it as '22000' or 'contig_2012')
Will be great if you could help me to delete all of them from the cell.
Thanks, Shilo
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 15 de En. de 2013
Editada: Azzi Abdelmalek
el 15 de En. de 2013
% in this example we rmove '00' and '123'
A={'123' '1234' '12345' '11' '00'};
idx=cellfun(@(x) isequal(x,'00') | isequal(x,'123'),A);
A(idx)=[]
3 comentarios
Shilo
el 16 de En. de 2013
José-Luis
el 16 de En. de 2013
Please don't forget to accept an answer if it helps you.
Muhammad Usman Saleem
el 5 de Nov. de 2017
This answer is for cell array of {1,5} what about array of {31,6} ?
Categorías
Más información sobre Logical 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!