Change txt2mat reading directory in a loop

Hi, I have 100 .csv files in the computer to be read, how do I make the script in MATLAB to read all the directory .csv files? The .csv files are named from DS0000 to DS0099.
I tried to make some code and it doesn't work...
for i=00:99;
data(i) = txt2mat('C:\Users\Jes\Desktop\Experiment\1412\DS00%i.csv');
end
Thanks.

 Accepted Answer

1 Comment

Thanks, the link you supplied has helped a lot. I have solved this problem.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!