Splitting the elements in the cell array
21 views (last 30 days)
Show older comments
Gopalakrishnan venkatesan
on 28 Oct 2016
Edited: Gopalakrishnan venkatesan
on 18 Dec 2018
I have a cell array,
a = { abcdsfa_def , ef_ghi, higdsfasfa_klm}
Now i need to remove the each element in the cell array from '_'.
my answer should be a = {abcdsfa, ef, higdsfasfa}
Thanks a lot
1 Comment
Accepted Answer
Jan
on 28 Oct 2016
While this does not match the shown output, it matches your explanations:
a = {'abcdsfa_def', 'ef_ghi', 'higdsfasfa_klm'}
r = strtok(a, '_')
0 Comments
See Also
Categories
Find more on Data Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!