importing tsv files yyyy.mm.dd.tsv
Show older comments
Hi I'm beginner in MATLAB. I need to import tsv files that are named as follows:
2004.01.01.0000.tsv
2004.01.01.0300.tsv
2004.01.01.0600.tsv
2004.01.01.0900.tsv
2004.07.01.1200.tsv
2004.01.01.1500.tsv
2004.01.01.1800.tsv
2004.01.01.2100.tsv
2004.01.02.0000.tsv
2004.01.02.0300.tsv
2004.01.02.0600.tsv
2004.01.02.0900.tsv
2004.01.02.1200.tsv
2004.01.02.1500.tsv
2004.01.02.1800.tsv
2004.01.02.2100.tsv
...
...
2005.12.31.2100.tsv
so each day has 8 files associated with it.
I need to import them as a 3 dimensional matrix using for loops.
I have the idea that my code should look something like this but it is not easy as I think
for yy=2004:2005
y= int2str(yy);
for mm=1:12
m= int2str(mm);
for dd=1:31
d= int2str(dd);
for ii=0000:0300:2100
i=int2str(ii);
z(:,:,)=importdata(y.m.d.i);
end
end
end
end
Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets 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!