A couple of things. You seem to be on the right track with your data loading;
EEGHere = evalin('base','EEG'); DataHere = EEGHere.data;
But you may want to store it in handles;
handles.DataHere = DataHere; guidata(hObject, handles);
because the GUI is comprised of a bunch of different functions (callbacks, user-defined functions, etc.), and DataHere is only available to the function in which it is defined (unless you explicitly pass it to another function). On the other hand, handles is stored in the GUI figure, and all the callbacks usually have access to it. You just have to make sure to keep it up-to-date with the guidata command. That is, if you change the value of handles.DataHere in a subfunction, and want to keep that value changed in the function that called it, you'll have to run guidata(...) within the subfunction.
Now this command;
channel = get(handles.editchannel); signal = DataHere(channel,:);
is about halfway there, get(handles.editchannel), returns a structure with all the properties from editchannel. I think you want a specific property, maybe;
channel = get(handles.editchannel,'Value');
Now if editchanel is an editbox, this will return a string not a number, so you'll have to use str2num() on the output as well.
Best Answer