Splitting the elements in the cell array
조회 수: 21 (최근 30일)
이전 댓글 표시
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
채택된 답변
Jan
2016년 10월 28일
While this does not match the shown output, it matches your explanations:
a = {'abcdsfa_def', 'ef_ghi', 'higdsfasfa_klm'}
r = strtok(a, '_')
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!