Replace the element in the cell array with space inbetween
Show older comments
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 Comment
Gopalakrishnan venkatesan
on 6 May 2015
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 6 May 2015
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=strrep(element,'num riqu','numeric');
element=strrep(element,'con tant','constant')
2 Comments
Gopalakrishnan venkatesan
on 6 May 2015
Edited: Gopalakrishnan venkatesan
on 6 May 2015
Azzi Abdelmalek
on 6 May 2015
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
Categories
Find more on Variables 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!