Marks can be generated from computing a flag structure based on any criteria you would like. Creating functions that test the data for particular features is easily done by generating a script.
:b: The following code snippets are from the BUCANL *eeglab_pipe_asr_amica* pipeline: *s01_scalpart.htb* script.
The example below calls the function *chan_neighbour_r* which creates an array based on the statistical difference between channels. If these channels are correlated to similarly than they will be assigned a mark value of 1 while the good channels remain with marks of 0. This information is then stored in one of the EEG.marks.chan_info().flags arrays. All of the bad channels can be isolated using the *chan_info* marks structure and then dealt with accordingly.