Need help looping through each element in cell array and editing the elements?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I currently have a 10000 x 1 cell array, with each element corresponding to text that look like this: '5/13/2014 16:14,911,724 Biomarkers_neuron_ca_T05-13-14.csv'. I want to loop through each of these elements and delete all text before Biomarkers as well as the '.csv' to be left with elements: 'Biomarkers_neuron_ca_T05-13-14' and so on.
Appreciate the help!
0 个评论
采纳的回答
Azzi Abdelmalek
2015-8-10
str='5/13/2014 16:14,911,724 Biomarkers_neuron_ca_T05-13-14.csv'
out=regexpi(str,'\<Biomarkers.+','match')
3 个评论
Azzi Abdelmalek
2015-8-10
str={'5/13/2014 16:14,911,724 Untitled_neuron_ca_T05-13-14.csv','5/13/2014 16:14,911,724 Biomarkers_neuron_ca_T05-13-14.csv'}
out=regexpi(str,'\<\S*.csv\>','match')
out{:}
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!