Removing the string from cell array
89 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gopalakrishnan venkatesan
il 1 Lug 2015
Modificato: Stephen23
il 1 Lug 2015
a = {'fdf_faf' ; 'dfaf_dfa' ; 'dfadf_dfaf'; 'dfaf_fdaf';'daf_dfaf';'dfaf_fff'};
index = find(strncmpi(a,'dfaf',4))
index =
2
4
6
so above index string should be removed from cell array
How can i do this using cell fun or some other command?
Thanks a lot
0 Commenti
Risposta accettata
Mischa Kim
il 1 Lug 2015
Gopalakrishnan, use e.g. strrep
a = {'fdf_faf' ; 'dfaf_dfa' ; 'dfadf_dfaf'; 'dfaf_fdaf';'daf_dfaf';'dfaf_fff'};
arep = strrep(a,'dfaf','')
3 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!