rdann cannot find file on specified path (Physionet wfdb)

22 views (last 30 days)
Hi there,
I am working with physionet data (2018 you snooze you loose compitition) and the wfdb toolbox. I am trying to use the rdann function to read the .annotation data;
annRead = rdann(recordName, annotator)
As per the docuemntation I should be able to specify the full pathname for "recordName" and the file extention for "annotator" so for file "tr03-0005.arousal" it would look something like this;
recordName = ('H:\PhD_DataBase\physionet.org\files\challenge-2018\1.0.0\training\tr03-0005\tr03-005.arousal') % Location, NB: each patient has their own file and subfold with identical names
annotator = ('arousal') %arousal file type
annRead = rdann(recordName, annotator); % call rdann func
When I attempt to run the above I get the error 'Command exited with non-zero status!!' which I am assuming means the file cannot be found, however the folder (and subfolders) have been added to path and are listed in 'Set Path'. However if I try,
a logical 1 is returned so the file can be found.
Has anyone had success opening the .arousal files for this dataset (2018 you snooze you loose compitition) with rdann?
The files are open source data so I will include a couple patients in the structure provided. I can read in the .mat and .hea files no problem but I need the .arousals (not the trXX-XXXX-arousal.mat file those are fine but the actual .arousal files). I have stripped out the data files as they are too large to upload but the .arousal, .hea and (arousal).mat are still there. I care about the .arousal files as it has more information included than the trXX-XXXX-arousal.mat files.
Kinds regards,
Christopher McCausland
Christopher McCausland on 26 Jan 2022
Unfortunatly I still have to received any update from the Physionet team.
I have been implementing a work around to pull all the annotation data once and store this to a cell matrix of cells for later use/processing. Using dir to query the local filenames (which match those stored on the server) and then using that list of files to querey those of the same name on the server (which can't/won't return a dir like name list). This allows the files to be looped through on the server and all annotations to be stored locally. Working from the sever rather than local flies takes longer to compute, but as the script will run once and then the generated cell array will be used instead.
@Star Strider thank you for the advice though, I do really apreshate it! If you want to post a placeholder answer I am more than happy to accept. With some additional searching it is clear that direct path issue is a bug faced by many others too!
Kind regards,

Sign in to comment.

Answers (0)


Find more on Scope Variables and Generate Names in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by