Hi Sarah,
This error is produced because the fir1.m
file that is called is not the one from the Matlab Signal Processing Toolbox. It may be introduced by other toolbox in your path, most likely by FieldTrip
Check this other post with the same error: Detecting Custom Events
Best,
Raymundo