[Eeglablist] Startle Processing Script Error
Ken Bennett
benne257 at uwm.edu
Tue Feb 9 09:41:29 PST 2016
Steve,
Thank you very much for your input and all of the helpful information! I
will check to see which format my triggers are in. I think that some of my
epochs may have more than one trigger, so I will look further into
resolving this issue. I will let you know if I cannot work around the error
and request a sample of your code. I appreciate it.
Thanks!
Ken
--
Kenneth Bennett
Second Year Clinical Graduate Student
Affective Neuroscience Laboratory
Department of Psychology
University of Wisconsin-Milwaukee
334 Garland Hall
*CONFIDENTIALITY NOTICE: *This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential or proprietary information which is legally privileged. Any
unauthorized review, use, disclosure, or distribution is prohibited. If you
are not the intended recipient, please promptly contact the sender by reply
e-mail and delete the message.
On Tue, Feb 9, 2016 at 1:48 AM, Stephen Politzer-Ahles <
stephen.politzer-ahles at ling-phil.ox.ac.uk> wrote:
> Hi Ken,
>
> This is not an EEGLAB-related error, this is an error in your code. As the
> error messages explain, the str2num() function requires its input to be a
> string (it converts a string to a numeric format, for example, str2num( '2'
> ) returns the integer 2 rather than the string '2'). But EEG.event.type in
> your dataset is apparently not in string format. Probably what happened is
> that whoever wrote the script wrote it with the assumption that
> EEG.event.type was always a string (e.g. a trigger number coded as a
> string, like '1', '2', etc.; some EEG acquisition systems record the
> triggers in this way), but yours is in another format. Maybe it's already
> in integer format; more likely, you have some epochs which include more
> than one trigger. For instance, if epoch 1 happens to have three triggers
> in it, then EEG.event(1).type might be e.g. {'1' '2' '3'}; str2num() cannot
> take this value as input.
>
> For what it's worth, I use a similar approach in my code (also using
> arrayfun() to pull out the triggers from the EEG.event structure); if you
> are not able to work around this error, let me know and I can send a sample
> of my code, which has had to handle the exact same kind of situation I
> described above (multiple events within a single epoch).
>
> Best,
> Steve
>
>
>
> ---
> Stephen Politzer-Ahles
> University of Oxford
> Language and Brain Lab
> Faculty of Linguistics, Phonetics & Philology
> http://users.ox.ac.uk/~cpgl0080/
>
> On Mon, Feb 8, 2016 at 11:19 PM, Ken Bennett <benne257 at uwm.edu> wrote:
>
>> Hello all,
>>
>> I am having some difficulties running startle EMG data through a shared
>> matlab script. The script runs a high pass filter, rectify, low pass,
>> epoch/baseline correct, artifact rejection, and peak score. Whenever I run
>> it, I receive an error that says:
>>
>> Error using str2num (line 33)
>>
>> Requires string or character array input.
>>
>>
>> Error in @(x)(str2num(EEG.event(x).type))
>>
>>
>> Error in EEGLAB_StartleReduction (line 34)
>>
>> triggers = arrayfun( @(x)(str2num(EEG.event(x).type)),
>> 1:length(EEG.event) )’;
>>
>>
>> I tried troubleshooting the error with a colleague who also uses this
>> script, but we could not fix it. Is anyone familiar with this script and/or
>> this error?
>>
>> Here is a link to the .set file and script file
>> (EEGLAB_StartleReduction.m): http://1drv.ms/1KBCFPA
>>
>> Please let me know if you have any questions or comments.
>>
>> Thanks!
>> Ken
>>
>> --
>>
>> Kenneth Bennett
>> Second Year Clinical Graduate Student
>> Affective Neuroscience Laboratory
>> Department of Psychology
>> University of Wisconsin-Milwaukee
>> 334 Garland Hall
>>
>>
>> *CONFIDENTIALITY NOTICE: *This e-mail message, including any
>> attachments, is for the sole use of the intended recipient(s) and may
>> contain confidential or proprietary information which is legally
>> privileged. Any unauthorized review, use, disclosure, or distribution is
>> prohibited. If you are not the intended recipient, please promptly contact
>> the sender by reply e-mail and delete the message.
>>
>>
>> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160209/b6641b43/attachment.html>
More information about the eeglablist
mailing list