Can / how to use the function readtable to load mixed data from a .csv file, but only pull certain rows?
1 次查看(过去 30 天)
显示 更早的评论
Here is the code that I have that works, but its a bit clunky in that there are 68 columns of data and 8760 rows. It would be nice to only load the columns needed directly without having to convert the .csv files to .xls as my installation says it doesn't support .csv as a compatible excel file type. (probably because I'm using a mac with excel for mac 2008 on it.) The end goal is to not waste memory and loading time as this will be done with a list of 1020 files in the stations cell array. A secondary goal is to write code that is easily portable across all platforms not just windows.
T=readtable(stations{1},'HeaderLines',1);
T=T(:,[1 2 5 8 11 32 41 62]);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!