matlab files for EMRFD