[Eeglablist] use variable instead of numeric in pop_selectevent
Kathleen Van Benthem
kathy_vanbenthem at carleton.ca
Mon Jun 21 10:08:26 PDT 2021
Thanks for your quick reply.
The pop_selectevent code does permit ranges.
I have no problem running the code when I use the latency key with *numeric*
ranges e.g., '2<=100', for example.
The challenge is when I try to replace numerics with variables (e.g.,
'a<=b' instead of '2<=100' ) as you would do when you are looping through
all the eeg files in a folder. I have tried curly brackets and extra
apostrophes etc.. so that the values of the defined variables would be used
in the latency constraint, but not had any luck).
Kathleen Van Benthem Ph.D., Senior Research Scientist, Advanced Cognitive
Adjunct Research Professor, Department of Cognitive Science,
Carleton University, Ottawa, ON. Canada. K1S5B6
kathy.vanbenthem at carleton.ca
Phone: (613) 355-2515
On Mon, Jun 21, 2021 at 12:06 PM Cedric Cannard <ccannard at protonmail.com>
> [External Email]
> Hi Kathleen,
> I believe this is because latency can only have one number (e.g. a)
> whereas you have two with [a, b].
> On Mon, Jun 21, 2021 at 08:06, Kathleen Van Benthem via eeglablist <
> eeglablist at sccn.ucsd.edu> wrote:
> Hello Lablist,
> Within a loop of many files, I need to change event names according to
> latency ranges using the script below (ranges change for each file being
> I have defined a and b based on the dynamically changing values. This
> throws errors that I need to use numbers, not variables.
> Is there a way that I can do this? BTW, 'a<=b' also does not work.
> EEG = pop_selectevent( EEG,
> Kathleen, Carleton University
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
> This email contains links to content or websites. Always be cautious when
> clicking on external links or attachments. If in doubt, please forward
> suspicious emails to phishing at carleton.ca.
> -----End of Disclaimer-----
More information about the eeglablist