Replace the element in the cell array with space inbetween
Ältere Kommentare anzeigen
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 ?
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 6 Mai 2015
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=strrep(element,'num riqu','numeric');
element=strrep(element,'con tant','constant')
2 Kommentare
Gopalakrishnan venkatesan
am 6 Mai 2015
Bearbeitet: Gopalakrishnan venkatesan
am 6 Mai 2015
Azzi Abdelmalek
am 6 Mai 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
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!