Replace the element in the cell array with space inbetween
Mostrar comentarios más antiguos
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 comentario
Gopalakrishnan venkatesan
el 6 de Mayo de 2015
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 6 de Mayo de 2015
element = {'num riqu' ; 'num riqu' ; 'con tant' ; 'con tant'}
element=strrep(element,'num riqu','numeric');
element=strrep(element,'con tant','constant')
2 comentarios
Gopalakrishnan venkatesan
el 6 de Mayo de 2015
Editada: Gopalakrishnan venkatesan
el 6 de Mayo de 2015
Azzi Abdelmalek
el 6 de Mayo de 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
Categorías
Más información sobre Variables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!