The physiology is sampled at 400Hz, and consists of Pulse (TTL), Resp, and SaO2 three columns of a text file.
MATLAB code to import Siemens physiology
Code Block |
---|
|
function T = import_phys( fn )
opts = delimitedTextImportOptions("NumVariables", 3);
% Specify range and delimiter
opts.DataLines = [1, Inf];
opts.Delimiter = "\t";
% Specify column names and types
opts.VariableNames = ["Pulse", "Resp", "SaO2"];
opts.VariableTypes = ["double", "double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
% Import the data
T = readtable(fn, opts);
if false
figure %#ok<UNRCH>
subplot(3,1,1),plot(T.Resp)
subplot(3,1,2),plot(T.SaO2)
subplot(3,1,3),plot(T.Pulse)
end |