필터 지우기
필터 지우기

how can i read large data in loop

조회 수: 1 (최근 30일)
khatere darvish
khatere darvish 2018년 10월 7일
댓글: khatere darvish 2018년 10월 8일
hello everybody
I have data with names 's001r01.edf', 's001r02.edf', 's001r03.edf','s002r01',... and it ends at 's109r03'. I know how I can read data but I want read the data in a loop. actually I want read the data only with first section of its name, it's mean 001,002,...,109. I read the data with this function:
[data1, header] = ReadEDF('S109R04.edf');
  댓글 수: 1
Kevin Chng
Kevin Chng 2018년 10월 7일
sorry if my answer is wrong for you
EDF = dir('*.edf');
data = cell(length(edf),1);
header = cell(length(edf),1);
for q = 1:length(edf)
[data(q), header(q)] = ReadEDF('S109R04.edf');
end
Line 2 and line 3 are not necessary if your readEDF return only 1 single variable.

댓글을 달려면 로그인하십시오.

채택된 답변

ANKUR KUMAR
ANKUR KUMAR 2018년 10월 7일
F=dir('*.edf')
for i=1:length(F)
[data1, header] = ReadEDF(F(i).name);
%do you usual calculation
%if you wish to store data1 and header for all files, then uncomment the next line
% [data1{i}, header{i}] = ReadEDF(F(i).name);
end
  댓글 수: 1
khatere darvish
khatere darvish 2018년 10월 8일
i appreciate that. thank's a lot.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by