Replace the element in the cell array with space inbetween
Mostra commenti meno recenti
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 ?
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 6 Mag 2015
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=strrep(element,'num riqu','numeric');
element=strrep(element,'con tant','constant')
2 Commenti
Gopalakrishnan venkatesan
il 6 Mag 2015
Modificato: Gopalakrishnan venkatesan
il 6 Mag 2015
Azzi Abdelmalek
il 6 Mag 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
Categorie
Scopri di più su Variables in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!