https://it.mathworks.com/help/signal/ref/edfwrite.deleteannotations.html
deleteAnnotations - Delete annotations from EDF or EDF+ file - MATLAB
This MATLAB function deletes the annotations at the indices specified in annotationindices from the European Data Format (EDF) or EDF+ file.
deleteannotationsedffilematlab