DIVIDING A SIGNAL INTO SHORTER SEGMENTS AND SAVING THEM
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello, I have a signal of 30 minutes duration. It is a csv file. I want to divide it into non overlapping segments of 10 sec duration and save them as different recordings. The sampling frequency of the signal is 360 Hz. How can I achieve this in matlab?
댓글 수: 6
채택된 답변
Jan
2018년 3월 7일
Folder = 'E:\data_Lab\MITBIH\edited\';
X = xlsread('E:\data_Lab\MITBIH\edited\100.csv');
X1 = X(:,1);
t1 = 1;
t2 = 3600;
k = 1;
while t2 <= 651600
new_seg = X1(t1:min(t2,length(X1)));
File = sprintf('Part%04d.csv', k);
csvwrite(fullfile(Folder, File), new_seg);
t1 = t1 + 3600;
t2 = t2 + 3600;
k = k + 1;
end
댓글 수: 3
kalana jayasekara
2020년 5월 25일
can u plz tell me how to do exact same thing by input mp3 format file and take out put as mp3 file?
Anusshree
2023년 12월 19일
Can you please tell me how to divide a one hour .mat signal into 2 minute segments and store it in a seperate folder?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!