MATLAB Answers

How to load multiple csv files and save them after converting into arff files?

2 views (last 30 days)
hello_world
hello_world on 10 Jun 2015
Edited: hello_world on 12 Jun 2015
Hello Friends,
I have several csv files, all stored in path 'C:\Users\Name\Documents\MATLAB\*.csv'. I want to loop one by one each file in order, convert them into arff files, and save them 'C:\Users\Name\Documents\MATLAB\*.arff'

Accepted Answer

Walter Roberson
Walter Roberson on 10 Jun 2015
datadir = 'C:\Users\Name\Documents\MATLAB';
d = dir(fullfile(datadir, '*.csv'));
for i=1:length(d)
filename = fullfile(datadir, d(i).name);
  5 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!