Reading huge number of excel files in a loop
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi!
I have 1090 .csv files to read. What I am trying to accomplish is compare column 1 from each of those Excel files and then extract the elements common in that column across all the 1090 .csv files. Since MATLAB does not already have a function to intersect multiple vectors, I am using the MINTERSECT function I found here ( https://www.mathworks.com/matlabcentral/fileexchange/6144-mintersect-multiple-set-intersection ).
The problem I am encountering is that the number of arguments for this function is HUGE in my case! Even if it is a lot, I can definitely mention all the vector names in the argument, that's not difficult. But before doing that I need to read all the 1090 .csv files and extract the column 1 elements and store it in a different vector with a different name corresponding to each .csv file. I was trying to do this using a FOR loop but I am not able to do it.
Can someone please help? Please let me know if you need any more clarification from me.
1 Kommentar
Antworten (1)
dpb
am 8 Aug. 2018
All that function is is a loop around intersect one vector at a time; that's all you need must do, there's no need to put all the variables into the argument list at all, just start with the first and rinse and repeat 'til done.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!