how do I Load multiple csv files to collate data???
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey,
So I'm really stuck on this assignment that I have, I've been trying different methods but again I go back to the first point I started with.
See, the question asks us to use a for loop to read a collection of files in turn and then plot them, but I'm not really sure how to read all of them..
I would really appreciate it if someone could help me.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195433/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195433/image.png)
댓글 수: 1
dpb
2018년 11월 17일
So, what have you done so far? It is pretty-well outlined the steps you need to take and that you've been introduced to the required elements already -- so give it a go!
답변 (1개)
ahmed nebli
2018년 11월 17일
try something like that i could work
num_files = 5;
for i = 1 : num_files
lat = ncread(sprintf('rawdata0', i), 'lat');
lon = ncread(sprintf('rawdata0', i), 'lon');
time = ncread(sprintf('rawdata0', i), 'time');
TSA = ncread(sprintf('rawdata0', i), 'TSA');
TXx = ncread(sprintf('rawdata0', i), 'TXx');
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Help and Support에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!