How to remove character in table
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello guys !
(Sorry 4 my english)
I'm trying to remove character in a table that contains some genome sequences (cell vector)... In particular i have:
A = {'T'; 'G'; 'A'; 'TT'; 'TGAT'; 'G'};
My intention is to delete all the rows that contain MORE than one letter.. so the rows 'TT' and 'TGAT' must be deleted.
Can you help me please? Is there some particular function that i can use?
Ty so much
0 commentaires
Réponse acceptée
KSSV
le 31 Jan 2017
A = {'T'; 'G'; 'A'; 'TT'; 'TGAT'; 'G'};
l = cell2mat(cellfun(@length,A,'un',0)) ;
A(l>1) = []
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!