Select parts of a string in MATLAB
Show older comments
I have a character string that looks something like:
string =
The DOC for the 10 percent ROI = 332.45 dollars/pass
I want to retrieve only the '332.45' bit from it and I'm not sure how to go about it. I have a few possible ways I thought of (but am not sure how to implement):
1. I could select the characters based on where they appear wrt length of the string
2. I could select the characters based on the preceding string sequence.
I would need to repeat this several times since my file has some 1660 such values I need to retrieve.
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!