Creating a loop to receive data from multiple files
Afficher commentaires plus anciens
I have 400 csv files, which contains the location of points and its temperature value. What I want to do is to build a command that calculate derivative dT/dx which are equally spaced from each csv file, receive the specific row that has the maximum derivative, and save the information of every 400 files in a single file. I would have done it if there are only about 10files, but for 400 files must be done with loops. Please help me. Thank you
1 commentaire
young jin Kwak
le 13 Nov 2016
Réponses (1)
Shivaputra Narke
le 13 Nov 2016
0 votes
Hey there, I am not understanding what is exactly stopping you to do this ? I guess, you are not doing it because of time constraint on processing 400 files (even through loop xlsread/csvread will take more time that depends upon the file size too).
Temp=[]; Locn=[]; for i=1:length(DataFiles) [Data,text,~]=xlsread(DataFiles{i}); % For e.g. in excel, column 4 contains temperature and column 5 contains location of points Temp(:,i)=Data(:,4); Locn(:,i)=Data(:,5); end
1 commentaire
young jin Kwak
le 13 Nov 2016
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!