Selecting part of a string
Show older comments
I have a list of file names in a variable called file_name e.g:
[a.txt b.txt c.txt d.txt]
I would like to create a new variable which only contains:
[a b c d]
Is this possible?
Thanks in advance Matt
3 Comments
Gerd
on 14 Jun 2011
Hi Matt,
is your file_name variable just one string like
file_name = ['a.txt' 'b.txt' 'c.txt' 'd.txt']?
Matt
on 14 Jun 2011
Paulo Silva
on 14 Jun 2011
You say 4 rows and 1 column but your example is 4 columns and 1 row
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements 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!