Removing the string from cell array
104 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gopalakrishnan venkatesan
am 1 Jul. 2015
Bearbeitet: Stephen23
am 1 Jul. 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 Kommentare
Akzeptierte Antwort
Mischa Kim
am 1 Jul. 2015
Gopalakrishnan, use e.g. strrep
a = {'fdf_faf' ; 'dfaf_dfa' ; 'dfadf_dfaf'; 'dfaf_fdaf';'daf_dfaf';'dfaf_fff'};
arep = strrep(a,'dfaf','')
3 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Cell Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!