Matlab code for EDF viewer