Home Matlab: Saving the filenames of files with specific extension, contained in a folder
Reply: 0

Matlab: Saving the filenames of files with specific extension, contained in a folder

user649
1#
user649 Published in May 27, 2018, 3:38 am

I'm working on a funcion to plot the data of many .csv files contained on the same folder. To do it automatically, I want to save the filenames as a string array but the only function I know I can use to get the list of files is dir and by doing

x = dir('MyFolder')

I get a struct array, not a string or char or whatever array instead. Then, I tried to save on another variable only the first column (from the 3rd row to the end) of the struct array because the filenames lay there, but I get the same struct without the first two rows.

How would you do to solve it? Thank you in advance.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313785 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO