Analyze MIMIC III waveform data directly in Matlab

조회 수: 15 (최근 30일)
Ram Krishnan
Ram Krishnan 2024년 7월 10일
답변: Ram Krishnan 2024년 10월 6일
I would like to analyze MIMIC III waveform data (mainly PPG and ABP) directly in Matlab on a MacOS without going through Google or AWS database queries. Has anyone done this? Can you advise me on the best way?
Thanks
Ram
  댓글 수: 1
Douaa
Douaa 2024년 10월 6일
hey, did you get the data? could you please show me how did you get it? thanks in advance

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

답변 (2개)

William Rose
William Rose 2024년 7월 10일
After you reigtser on the physionet site, you may use the package here
You should also check out the use of "wget" to download files from the MIMIC-III database, as described here:
(Scroll down to wget, or search the page for wget.)
wget is not part of Mac OS, but you can get it. Google "wget for Mac". I am not a Mac person.
  댓글 수: 2
Ram Krishnan
Ram Krishnan 2024년 7월 11일
William,
That is hugely helpful as all the exploring I did on Matlab's Help site and on Google were unproductive. I'll try both tools out.
Thanks
Ram
William Rose
William Rose 2024년 7월 11일
@Ram Krishnan, you're welcome. Good luck with your research.

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


Ram Krishnan
Ram Krishnan 2024년 10월 6일
clc;clear;close all;
fileDir = '/myMimicDir/';
recList = append(fileDir,'mimic3wdbRecordsWithPpgANDbp.txt');
fileID = fopen(recList);
numRecs = 10; % number of data records to read and write into excel
numSamples = 1000000; % number of samples to read and write in each record
for i = 1:numRecs
wdbRec(i) = textscan(fileID,'%s \n');
% wdbRec{i}
end
fclose(fileID);
for i = 1:numRecs
[fileNameTemp,~,~] = wfdbdesc(char(wdbRec{i}));
fileName = struct2cell(fileNameTemp);
[~,~,numVar] = size(fileName);
for j=1:numVar
varName = fileName(9,1,j);
if contains(varName,'PLETH')
ppgCol = j;
elseif contains(varName,'ABP')
abpCol = j;
end
end
recName = cell2mat(wdbRec{1,i});
fprintf('Record number %d \n',i);
fprintf('Now in rdsamp.. \n')
[signal,Fs,tm]=rdsamp(recName,[ppgCol abpCol],numSamples);
writeFileDir = '/myMimicDir/PPG-ABP dataset created by ReadMimic3wdbFileList_092324/';
recLabel = recName(end-23:end); % use last 23 char of recName to create a spreadsheet name
writeFileName = append(writeFileDir,recLabel);
excelFileName = append(writeFileName,'.xlsx');
fprintf('Now in writematrix..\n')
writematrix(signal,excelFileName);
%%% plot for visualizing signals
% figure
% plot(tm(5000:10000),signal(5000:10000,1)); % first 5000 samples may be noise
% figure
% plot(tm(5000:10000),signal(5000:10000,2))
end

카테고리

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

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by