Analyze MIMIC III waveform data directly in Matlab

38 次查看(过去 30 天)
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

回答(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

请先登录,再进行评论。


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 中查找有关 Logical 的更多信息

标签

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by