How do I replace/manipulate characters in a string? Specifically integers in a string...
Mostrar comentarios más antiguos
If I have a string like axiom = 'F18-F4+F'; I need to manipulate the string so that it reads as follows: F------------------F++++F
Basically I need for the numbers in the string to behave as integer multipliers on the + and - sign.
I have tried many combinations and approaches using regex, str2Double, isstrprop(axiom, 'alpha'); Anyone have any advice on this kind of string manipulation? Thanks in advance!
2 comentarios
dpb
el 29 de En. de 2017
I've no klew what the "I need" expression is intended to mean?
Give us the rule for how to generate the output from the input.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Characters and Strings 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!