<p dir="ltr">Hey Bart,</p>
<p dir="ltr">I am not sure what causes your problem but there are couple of ways to check :)</p>
<p dir="ltr">First of all - did you paste the entire error message? If not - please do, it will help anybody to solve your problem.</p>
<p dir="ltr">pop_eegplot, as many other eeglab gui functions do not use function handles in button callbacks but strings that are eval'ed whenever you press the button. <br>
It seems that somewhere (in some workspace where the callback is eval'ed) there is no EEG variable (having precisely this name).</p>
<p dir="ltr">However, the fact that the presence of EEGlab saves you from this error is informative in at least one way:<br>
- EEGlab uses EEG as a global variable - that is, it can be acessed from any workspace by first declaring:<br>
global EEG</p>
<p dir="ltr">Could you check if declaring EEG as global solves the problem?</p>
<p dir="ltr">If not, another question:<br>
- if you are not using eeg_plot in presence of EEGlab what is the context that you use eeg_plot in? You mentioned command window, but how are your data (EEG) loaded, what scripts/functions lead you to the point where the error occurs?</p>
<div class="gmail_quote">2 gru 2013 21:35 "Bart Michiels" <<a href="mailto:MICHELSB@tcd.ie">MICHELSB@tcd.ie</a>> napisał(a):<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey,<br>
<br>
I'm having troubles with the pop_eegplot function. I have continuous EEG component data that I want to plot with this function for manual artefact rejection.<br>
When I put the " pop_eegplot(EEG, 0, 1, 1)" in the command window the eegplot window opens and everything seems to work.<br>
However, when selecting a time frame and pressing on the reject button I get the following error:<br>
<br>
Undefined function or variable "EEG".<br>
Error while evaluating uicontrol Callback<br>
<br>
I debugged both the eegplot and pop_eegplot functions and it seems that there is no problem with those functions (as everything is functioning well until I press the "reject" button).<br>
<br>
The weird thing is that rejecting with pop_eegplot() in the command window of matlab screen is working when eeglab window is opened (and minimized).<br>
<br>
Can someone help me with this problem?<br>
<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
</blockquote></div>