Simple MATLAB code to plot outputs from the RespirAct and calculate simple summary statistics.
Input files to this code are from the RespirAct (Gen4) text outputs, automatically saved after a session. Found in:
RA-MR -> SessionDB -> StudyDB Name -> Date (SubID)
This is the type of output that this code will produce (plotting all the data):
Then if you change the start and end events you can plot a subset of the data (the blue box in the first figure) and get some simple summary statistics: