Numbering of repeating string in text file
Show older comments
Hi,
I have a repeating string as following:
materialIndex [
25, 36, 26, 21,-1,
21, 21, 21, 21,-1,
47, 36, 39,-1,
etc.
materialIndex [
47, 36, 37, 47,-1,
56, 54, 47, 47,-1,
47, 35, 36, 47,-1,
etc.
I would like to number these strings as following or similar:
materialIndex1 [
25, 36, 26, 21,-1,
21, 21, 21, 21,-1,
47, 36, 39,-1,
etc.
materialIndex2 [
47, 36, 37, 47,-1,
56, 54, 47, 47,-1,
47, 35, 36, 47,-1,
etc.
I couldn't find a solution so far to this problem.
4 Comments
Ameer Hamza
on 16 May 2020
Is this inside a txt file, or the string are loaded in MATLAB?
Daniel Rohrer
on 17 May 2020
KSSV
on 17 May 2020
How did you load it into MATLAB?
Daniel Rohrer
on 17 May 2020
Edited: Daniel Rohrer
on 17 May 2020
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!