Error in import data
4 次查看(过去 30 天)
显示 更早的评论
header = 9;
delimiter = '\t';
for i = 1:2
filname = ['H1','2_I1sv00001 -',num2str(i),".txt"];
dat =importdata(filname,delimiter,header);
end
Error using importdata
Unable to open file.
0 个评论
采纳的回答
Rik
2023-3-14
You didn't form the file names properly, so you were trying to read files that don't exist. You're also overwriting the results.
header = 9;
delimiter = '\t';
for i = 1:2
filname = sprintf('H1, 2_I1sv%05d.txt',i);
dat(i) =importdata(filname,delimiter,header);
end
dat
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!