Analyze MIMIC III waveform data directly in Matlab

34 visualizzazioni (ultimi 30 giorni)
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 Commento
Douaa
Douaa il 6 Ott 2024
hey, did you get the data? could you please show me how did you get it? thanks in advance

Accedi per commentare.

Risposte (2)

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

Accedi per commentare.


Ram Krishnan
Ram Krishnan il 6 Ott 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

Tag

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by