How do I replace/manipulate characters in a string? Specifically integers in a string...
显示 更早的评论
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 个评论
dpb
2017-1-29
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!