Replace the element in the cell array with space inbetween
이전 댓글 표시
I have a cell array element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
I need to replace num riqu = numeric
con tant = constant
how can I do this ?
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2015년 5월 6일
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=strrep(element,'num riqu','numeric');
element=strrep(element,'con tant','constant')
댓글 수: 2
Gopalakrishnan venkatesan
2015년 5월 6일
편집: Gopalakrishnan venkatesan
2015년 5월 6일
Azzi Abdelmalek
2015년 5월 6일
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=regexprep(element,'num riqu','numeric')
element=regexprep(element,'con tant','constant')
But strrep is faster then regexprep
카테고리
도움말 센터 및 File Exchange에서 Variables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!