Single-trial analysis and its applications in EEG and simultaneous EEG-fMRI studies