Analyze MIMIC III waveform data directly in Matlab

38 Ansichten (letzte 30 Tage)
Ram Krishnan
Ram Krishnan am 10 Jul. 2024
Beantwortet: Ram Krishnan am 6 Okt. 2024
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 Kommentar
Douaa Alhafez
Douaa Alhafez am 6 Okt. 2024
hey, did you get the data? could you please show me how did you get it? thanks in advance

Melden Sie sich an, um zu kommentieren.

Antworten (2)

William Rose
William Rose am 10 Jul. 2024
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 Kommentare
Ram Krishnan
Ram Krishnan am 11 Jul. 2024
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 am 11 Jul. 2024
@Ram Krishnan, you're welcome. Good luck with your research.

Melden Sie sich an, um zu kommentieren.


Ram Krishnan
Ram Krishnan am 6 Okt. 2024
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

Tags

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by