Creating a loop to receive data from multiple files
Mostrar comentarios más antiguos
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 comentario
young jin Kwak
el 13 de Nov. de 2016
Respuestas (1)
Shivaputra Narke
el 13 de Nov. de 2016
0 votos
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 comentario
young jin Kwak
el 13 de Nov. de 2016
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!