Change txt2mat reading directory in a loop

1 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2012-12-26
  1 个评论
Jesmond
Jesmond 2012-12-26
Thanks, the link you supplied has helped a lot. I have solved this problem.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 String Parsing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by