Creating a loop to receive data from multiple files
이전 댓글 표시
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개)
Shivaputra Narke
2016년 11월 13일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!