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!