How do I replace/manipulate characters in a string? Specifically integers in a string...
Show older comments
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 Comments
dpb
on 29 Jan 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.
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings 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!