How to open and access all csv files in one directory in MATLAB
10 views (last 30 days)
Show older comments
I am using the command name mentioned below.
This returns me a structure of 80x1 which is, 80 files. Now if I open the variable named 'data' I can only access the
file name, folder, bytes and something else but what I want to access is to open each file and use the contents of the file.
I am using MATLAB 2021a.
data = dir(fullfile('*.csv'));
Answers (1)
Image Analyst
on 20 Aug 2021
Code samples are in the FAQ:
Pick one of them and adapt as needed.
0 Comments
See Also
Categories
Find more on Data Import from MATLAB 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!