<html><head></head><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1452502996007_41374"><span id="yui_3_16_0_1_1452502996007_41375">Why Data do not load in GUI, but it loads in a script using fieldtrip ft-preprocessing function?</span></div><div id="yui_3_16_0_1_1452502996007_41384"><br><span id="yui_3_16_0_1_1452502996007_41375"></span></div><div id="yui_3_16_0_1_1452502996007_41393"><span id="yui_3_16_0_1_1452502996007_41375"></span></div><div id="yui_3_16_0_1_1452502996007_41394"><div id="yui_3_16_0_1_1452502996007_41421"><font id="yui_3_16_0_1_1452502996007_42085" size="3"> <font id="yui_3_16_0_1_1452502996007_41430"><font id="yui_3_16_0_1_1452502996007_41429" face="times new roman, new york, times, serif">Look a the two code below. One which is a script work perfectly fine.</font></font></font></div><div id="yui_3_16_0_1_1452502996007_41431"><font id="yui_3_16_0_1_1452502996007_41433" size="2"><font id="yui_3_16_0_1_1452502996007_41432" face="times new roman, new york, times, serif"><font id="yui_3_16_0_1_1452502996007_41806" size="3">The other one is inside a simple gui and Matlab crashes.....</font></font></font></div><div id="yui_3_16_0_1_1452502996007_42081"><font id="yui_3_16_0_1_1452502996007_41433" size="2"><font id="yui_3_16_0_1_1452502996007_41432" face="times new roman, new york, times, serif">Can anyone enlighten me?!</font></font></div><div id="yui_3_16_0_1_1452502996007_42083"><br></div><div id="yui_3_16_0_1_1452502996007_42084"><font id="yui_3_16_0_1_1452502996007_41433" size="2"><font id="yui_3_16_0_1_1452502996007_41432" face="times new roman, new york, times, serif">Thanks in advance<br></font></font></div></div><div id="yui_3_16_0_1_1452502996007_41404" class="signature"><div id="yui_3_16_0_1_1452502996007_41403"><font id="yui_3_16_0_1_1452502996007_41402" color="#000000"><div id="yui_3_16_0_1_1452502996007_41410" style="margin-top:0cm;margin-right:0cm;margin-bottom:0pt;margin-left:0cm;" class="MsoPlainText"><font id="yui_3_16_0_1_1452502996007_41412" class="Apple-style-span" size="2" face="'times new roman', 'new york', times, serif"><br></font></div></font></div><div id="yui_3_16_0_1_1452502996007_41435" style="MARGIN:0cm 0cm 0pt;" class="MsoPlainText"><div id="yui_3_16_0_1_1452502996007_41805"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41804"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41803"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41802"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41801"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div dir="ltr" id="yui_3_16_0_1_1452502996007_41838">function varargout = trial5(varargin)<br class="" id="yui_3_16_0_1_1452502996007_41849">% TRIAL5 MATLAB code for trial5.fig<br class="" id="yui_3_16_0_1_1452502996007_41851">%      TRIAL5, by itself, creates a new TRIAL5 or raises the existing<br class="" id="yui_3_16_0_1_1452502996007_41853">%      singleton*.<br class="" id="yui_3_16_0_1_1452502996007_41855">%<br class="" id="yui_3_16_0_1_1452502996007_41857">%      H = TRIAL5 returns the handle to a new TRIAL5 or the handle to<br class="" id="yui_3_16_0_1_1452502996007_41859">%      the existing singleton*.<br class="" id="yui_3_16_0_1_1452502996007_41861">%<br class="" id="yui_3_16_0_1_1452502996007_41863">%      TRIAL5('CALLBACK',hObject,eventData,handles,...) calls the local<br class="" id="yui_3_16_0_1_1452502996007_41865">%      function named CALLBACK in TRIAL5.M with the given input arguments.<br class="" id="yui_3_16_0_1_1452502996007_41867">%<br class="" id="yui_3_16_0_1_1452502996007_41869">%      TRIAL5('Property','Value',...) creates a new TRIAL5 or raises the<br class="" id="yui_3_16_0_1_1452502996007_41871">%      existing singleton*.  Starting from the left, property value pairs are<br class="" id="yui_3_16_0_1_1452502996007_41873">%      applied to the GUI before trial5_OpeningFcn gets called.  An<br class="" id="yui_3_16_0_1_1452502996007_41875">%      unrecognized property name or invalid value makes property application<br class="" id="yui_3_16_0_1_1452502996007_41877">%      stop.  All inputs are passed to trial5_OpeningFcn via varargin.<br class="" id="yui_3_16_0_1_1452502996007_41879">%<br class="" id="yui_3_16_0_1_1452502996007_41881">%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one<br class="" id="yui_3_16_0_1_1452502996007_41883">%      instance to run (singleton)".<br class="" id="yui_3_16_0_1_1452502996007_41885">%<br class="" id="yui_3_16_0_1_1452502996007_41887">% See also: GUIDE, GUIDATA, GUIHANDLES<br class="" id="yui_3_16_0_1_1452502996007_41889"><br class="" id="yui_3_16_0_1_1452502996007_41891">% Edit the above text to modify the response to help trial5<br class="" id="yui_3_16_0_1_1452502996007_41893"><br class="" id="yui_3_16_0_1_1452502996007_41895">% Last Modified by GUIDE v2.5 11-Jan-2016 13:20:07<br class="" id="yui_3_16_0_1_1452502996007_41897"><br class="" id="yui_3_16_0_1_1452502996007_41899">% Begin initialization code - DO NOT EDIT<br class="" id="yui_3_16_0_1_1452502996007_41901">gui_Singleton = 1;<br class="" id="yui_3_16_0_1_1452502996007_41903">gui_State = struct('gui_Name',       mfilename, ...<br class="" id="yui_3_16_0_1_1452502996007_41905">                   'gui_Singleton',  gui_Singleton, ...<br class="" id="yui_3_16_0_1_1452502996007_41907">                   'gui_OpeningFcn', @trial5_OpeningFcn, ...<br class="" id="yui_3_16_0_1_1452502996007_41909">                   'gui_OutputFcn',  @trial5_OutputFcn, ...<br class="" id="yui_3_16_0_1_1452502996007_41911">                   'gui_LayoutFcn',  [] , ...<br class="" id="yui_3_16_0_1_1452502996007_41913">                   'gui_Callback',   []);<br class="" id="yui_3_16_0_1_1452502996007_41915">if nargin && ischar(varargin{1})<br class="" id="yui_3_16_0_1_1452502996007_41917">    gui_State.gui_Callback = str2func(varargin{1});<br class="" id="yui_3_16_0_1_1452502996007_41919">end<br class="" id="yui_3_16_0_1_1452502996007_41921"><br class="" id="yui_3_16_0_1_1452502996007_41923">if nargout<br class="" id="yui_3_16_0_1_1452502996007_41925">    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});<br class="" id="yui_3_16_0_1_1452502996007_41927">else<br class="" id="yui_3_16_0_1_1452502996007_41929">    gui_mainfcn(gui_State, varargin{:});<br class="" id="yui_3_16_0_1_1452502996007_41931">end<br class="" id="yui_3_16_0_1_1452502996007_41933">% End initialization code - DO NOT EDIT<br class="" id="yui_3_16_0_1_1452502996007_41935"><br class="" id="yui_3_16_0_1_1452502996007_41937"><br class="" id="yui_3_16_0_1_1452502996007_41939">% --- Executes just before trial5 is made visible.<br class="" id="yui_3_16_0_1_1452502996007_41941">function trial5_OpeningFcn(hObject, eventdata, handles, varargin)<br class="" id="yui_3_16_0_1_1452502996007_41943">% This function has no output args, see OutputFcn.<br class="" id="yui_3_16_0_1_1452502996007_41945">% hObject    handle to figure<br class="" id="yui_3_16_0_1_1452502996007_41947">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41949">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41951">% varargin   command line arguments to trial5 (see VARARGIN)<br class="" id="yui_3_16_0_1_1452502996007_41953"><br class="" id="yui_3_16_0_1_1452502996007_41955">% Choose default command line output for trial5<br class="" id="yui_3_16_0_1_1452502996007_41957">handles.output = hObject;<br class="" id="yui_3_16_0_1_1452502996007_41959"><br class="" id="yui_3_16_0_1_1452502996007_41961">% Update handles structure<br class="" id="yui_3_16_0_1_1452502996007_41963">guidata(hObject, handles);<br class="" id="yui_3_16_0_1_1452502996007_41965"><br class="" id="yui_3_16_0_1_1452502996007_41967">% UIWAIT makes trial5 wait for user response (see UIRESUME)<br class="" id="yui_3_16_0_1_1452502996007_41969">% uiwait(handles.figure1);<br class="" id="yui_3_16_0_1_1452502996007_41971"><br class="" id="yui_3_16_0_1_1452502996007_41973"><br class="" id="yui_3_16_0_1_1452502996007_41975">% --- Outputs from this function are returned to the command line.<br class="" id="yui_3_16_0_1_1452502996007_41977">function varargout = trial5_OutputFcn(hObject, eventdata, handles) <br class="" id="yui_3_16_0_1_1452502996007_41979">% varargout  cell array for returning output args (see VARARGOUT);<br class="" id="yui_3_16_0_1_1452502996007_41981">% hObject    handle to figure<br class="" id="yui_3_16_0_1_1452502996007_41983">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41985">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41987"><br class="" id="yui_3_16_0_1_1452502996007_41989">% Get default command line output from handles structure<br class="" id="yui_3_16_0_1_1452502996007_41991">varargout{1} = handles.output;<br class="" id="yui_3_16_0_1_1452502996007_41993"><br class="" id="yui_3_16_0_1_1452502996007_41995"><br class="" id="yui_3_16_0_1_1452502996007_41997">% --- Executes on button press in pushbutton1.<br class="" id="yui_3_16_0_1_1452502996007_41999">function pushbutton1_Callback(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_42001">% hObject    handle to pushbutton1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_42003">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_42005">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_42007"><br class="" id="yui_3_16_0_1_1452502996007_42009">%file = fullfile(pathname, filename)<br class="" id="yui_3_16_0_1_1452502996007_42011">cfg1 = [];<br class="" id="yui_3_16_0_1_1452502996007_42013"><br class="" id="yui_3_16_0_1_1452502996007_42015">cfg1.trl = [1 61440 0];<br class="" id="yui_3_16_0_1_1452502996007_42017">cfg1.dataset = 'Event06_Interictal_Background_Sleep_Segment_1.edf';<br class="" id="yui_3_16_0_1_1452502996007_42019"> cfg1 = ft_definetrial( cfg1 );<br class="" id="yui_3_16_0_1_1452502996007_42021">cfg1.continuous = 'yes';<br class="" id="yui_3_16_0_1_1452502996007_42023"><br class="" id="yui_3_16_0_1_1452502996007_42025"> data1 = ft_preprocessing(cfg1);<br class="" id="yui_3_16_0_1_1452502996007_42027"><br class="" id="yui_3_16_0_1_1452502996007_42029"><br class="" id="yui_3_16_0_1_1452502996007_42031"><br class="" id="yui_3_16_0_1_1452502996007_42033">function edit1_Callback(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_42035">% hObject    handle to edit1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_42037">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_42039">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_42041"><br class="" id="yui_3_16_0_1_1452502996007_42043">% Hints: get(hObject,'String') returns contents of edit1 as text<br class="" id="yui_3_16_0_1_1452502996007_42045">%        str2double(get(hObject,'String')) returns contents of edit1 as a double<br class="" id="yui_3_16_0_1_1452502996007_42047"><br class="" id="yui_3_16_0_1_1452502996007_42049"><br class="" id="yui_3_16_0_1_1452502996007_42051">% --- Executes during object creation, after setting all properties.<br class="" id="yui_3_16_0_1_1452502996007_42053">function edit1_CreateFcn(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_42055">% hObject    handle to edit1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_42057">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_42059">% handles    empty - handles not created until after all CreateFcns called<br class="" id="yui_3_16_0_1_1452502996007_42061"><br class="" id="yui_3_16_0_1_1452502996007_42063">% Hint: edit controls usually have a white background on Windows.<br class="" id="yui_3_16_0_1_1452502996007_42065">%       See ISPC and COMPUTER.<br class="" id="yui_3_16_0_1_1452502996007_42067">if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))<br class="" id="yui_3_16_0_1_1452502996007_42069">    set(hObject,'BackgroundColor','white');<br class="" id="yui_3_16_0_1_1452502996007_42071">end<br class="" id="yui_3_16_0_1_1452502996007_42073"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41839"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41540"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41541"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41542"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41543"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41544"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41786"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41784"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41787"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41800"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41788"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41789"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41799"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41790"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41791"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41792">***************************************************************************<br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41793"><br><font color="#000000"><font style="" face="bookman old style, new york, times, serif"><font face="bookman old style, new york, times, serif"><font color="#000000"><span style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span style="font-size:10pt;font-family:sans-serif;"></span></span></font></font></font></font></div><div id="yui_3_16_0_1_1452502996007_41775" dir="ltr"><font id="yui_3_16_0_1_1452502996007_41781" color="#000000"><font id="yui_3_16_0_1_1452502996007_41780" style="" face="bookman old style, new york, times, serif"><font id="yui_3_16_0_1_1452502996007_41779" face="bookman old style, new york, times, serif"><font id="yui_3_16_0_1_1452502996007_41778" color="#000000"><span id="yui_3_16_0_1_1452502996007_41777" style="color:rgb(84, 140, 214);font-size:9pt;font-family:Arial;" lang="EN-US"><span id="yui_3_16_0_1_1452502996007_41776" style="font-size:10pt;font-family:sans-serif;"><font class="" id="yui_3_16_0_1_1452502996007_41546" color="#000000"><font class="" id="yui_3_16_0_1_1452502996007_41548" face="bookman old style, new york, times, serif">function varargout = trial5(varargin)<br class="" id="yui_3_16_0_1_1452502996007_41550">% TRIAL5 MATLAB code for trial5.fig<br class="" id="yui_3_16_0_1_1452502996007_41552">%      TRIAL5, by itself, creates a new TRIAL5 or raises the existing<br class="" id="yui_3_16_0_1_1452502996007_41554">%      singleton*.<br class="" id="yui_3_16_0_1_1452502996007_41556">%<br class="" id="yui_3_16_0_1_1452502996007_41558">%      H = TRIAL5 returns the handle to a new TRIAL5 or the handle to<br class="" id="yui_3_16_0_1_1452502996007_41560">%      the existing singleton*.<br class="" id="yui_3_16_0_1_1452502996007_41562">%<br class="" id="yui_3_16_0_1_1452502996007_41564">%      TRIAL5('CALLBACK',hObject,eventData,handles,...) calls the local<br class="" id="yui_3_16_0_1_1452502996007_41566">%      function named CALLBACK in TRIAL5.M with the given input arguments.<br class="" id="yui_3_16_0_1_1452502996007_41568">%<br class="" id="yui_3_16_0_1_1452502996007_41570">%      TRIAL5('Property','Value',...) creates a new TRIAL5 or raises the<br class="" id="yui_3_16_0_1_1452502996007_41572">%      existing singleton*.  Starting from the left, property value pairs are<br class="" id="yui_3_16_0_1_1452502996007_41574">%      applied to the GUI before trial5_OpeningFcn gets called.  An<br class="" id="yui_3_16_0_1_1452502996007_41576">%      unrecognized property name or invalid value makes property application<br class="" id="yui_3_16_0_1_1452502996007_41578">%      stop.  All inputs are passed to trial5_OpeningFcn via varargin.<br class="" id="yui_3_16_0_1_1452502996007_41580">%<br class="" id="yui_3_16_0_1_1452502996007_41582">%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one<br class="" id="yui_3_16_0_1_1452502996007_41584">%      instance to run (singleton)".<br class="" id="yui_3_16_0_1_1452502996007_41586">%<br class="" id="yui_3_16_0_1_1452502996007_41588">% See also: GUIDE, GUIDATA, GUIHANDLES<br class="" id="yui_3_16_0_1_1452502996007_41590"><br class="" id="yui_3_16_0_1_1452502996007_41592">% Edit the above text to modify the response to help trial5<br class="" id="yui_3_16_0_1_1452502996007_41594"><br class="" id="yui_3_16_0_1_1452502996007_41596">% Last Modified by GUIDE v2.5 11-Jan-2016 13:20:07<br class="" id="yui_3_16_0_1_1452502996007_41598"><br class="" id="yui_3_16_0_1_1452502996007_41600">% Begin initialization code - DO NOT EDIT<br class="" id="yui_3_16_0_1_1452502996007_41602">gui_Singleton = 1;<br class="" id="yui_3_16_0_1_1452502996007_41604">gui_State = struct('gui_Name',       mfilename, ...<br class="" id="yui_3_16_0_1_1452502996007_41606">                   'gui_Singleton',  gui_Singleton, ...<br class="" id="yui_3_16_0_1_1452502996007_41608">                   'gui_OpeningFcn', @trial5_OpeningFcn, ...<br class="" id="yui_3_16_0_1_1452502996007_41610">                   'gui_OutputFcn',  @trial5_OutputFcn, ...<br class="" id="yui_3_16_0_1_1452502996007_41612">                   'gui_LayoutFcn',  [] , ...<br class="" id="yui_3_16_0_1_1452502996007_41614">                   'gui_Callback',   []);<br class="" id="yui_3_16_0_1_1452502996007_41616">if nargin && ischar(varargin{1})<br class="" id="yui_3_16_0_1_1452502996007_41618">    gui_State.gui_Callback = str2func(varargin{1});<br class="" id="yui_3_16_0_1_1452502996007_41620">end<br class="" id="yui_3_16_0_1_1452502996007_41622"><br class="" id="yui_3_16_0_1_1452502996007_41624">if nargout<br class="" id="yui_3_16_0_1_1452502996007_41626">    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});<br class="" id="yui_3_16_0_1_1452502996007_41628">else<br class="" id="yui_3_16_0_1_1452502996007_41630">    gui_mainfcn(gui_State, varargin{:});<br class="" id="yui_3_16_0_1_1452502996007_41632">end<br class="" id="yui_3_16_0_1_1452502996007_41634">% End initialization code - DO NOT EDIT<br class="" id="yui_3_16_0_1_1452502996007_41636"><br class="" id="yui_3_16_0_1_1452502996007_41638"><br class="" id="yui_3_16_0_1_1452502996007_41640">% --- Executes just before trial5 is made visible.<br class="" id="yui_3_16_0_1_1452502996007_41642">function trial5_OpeningFcn(hObject, eventdata, handles, varargin)<br class="" id="yui_3_16_0_1_1452502996007_41644">% This function has no output args, see OutputFcn.<br class="" id="yui_3_16_0_1_1452502996007_41646">% hObject    handle to figure<br class="" id="yui_3_16_0_1_1452502996007_41648">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41650">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41652">% varargin   command line arguments to trial5 (see VARARGIN)<br class="" id="yui_3_16_0_1_1452502996007_41654"><br class="" id="yui_3_16_0_1_1452502996007_41656">% Choose default command line output for trial5<br class="" id="yui_3_16_0_1_1452502996007_41658">handles.output = hObject;<br class="" id="yui_3_16_0_1_1452502996007_41660"><br class="" id="yui_3_16_0_1_1452502996007_41662">% Update handles structure<br class="" id="yui_3_16_0_1_1452502996007_41664">guidata(hObject, handles);<br class="" id="yui_3_16_0_1_1452502996007_41666"><br class="" id="yui_3_16_0_1_1452502996007_41668">% UIWAIT makes trial5 wait for user response (see UIRESUME)<br class="" id="yui_3_16_0_1_1452502996007_41670">% uiwait(handles.figure1);<br class="" id="yui_3_16_0_1_1452502996007_41672"><br class="" id="yui_3_16_0_1_1452502996007_41674"><br class="" id="yui_3_16_0_1_1452502996007_41676">% --- Outputs from this function are returned to the command line.<br class="" id="yui_3_16_0_1_1452502996007_41678">function varargout = trial5_OutputFcn(hObject, eventdata, handles) <br class="" id="yui_3_16_0_1_1452502996007_41680">% varargout  cell array for returning output args (see VARARGOUT);<br class="" id="yui_3_16_0_1_1452502996007_41682">% hObject    handle to figure<br class="" id="yui_3_16_0_1_1452502996007_41684">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41686">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41688"><br class="" id="yui_3_16_0_1_1452502996007_41690">% Get default command line output from handles structure<br class="" id="yui_3_16_0_1_1452502996007_41692">varargout{1} = handles.output;<br class="" id="yui_3_16_0_1_1452502996007_41694"><br class="" id="yui_3_16_0_1_1452502996007_41696"><br class="" id="yui_3_16_0_1_1452502996007_41698">% --- Executes on button press in pushbutton1.<br class="" id="yui_3_16_0_1_1452502996007_41700">function pushbutton1_Callback(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_41702">% hObject    handle to pushbutton1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_41704">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41706">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41708"><br class="" id="yui_3_16_0_1_1452502996007_41710">%file = fullfile(pathname, filename)<br class="" id="yui_3_16_0_1_1452502996007_41712">cfg1 = [];<br class="" id="yui_3_16_0_1_1452502996007_41714"><br class="" id="yui_3_16_0_1_1452502996007_41716">cfg1.trl = [1 61440 0];<br class="" id="yui_3_16_0_1_1452502996007_41718">cfg1.dataset = 'Event06_Interictal_Background_Sleep_Segment_1.edf';<br class="" id="yui_3_16_0_1_1452502996007_41720"> cfg1 = ft_definetrial( cfg1 );<br class="" id="yui_3_16_0_1_1452502996007_41722">cfg1.continuous = 'yes';<br class="" id="yui_3_16_0_1_1452502996007_41724"><br class="" id="yui_3_16_0_1_1452502996007_41726"> data1 = ft_preprocessing(cfg1);<br class="" id="yui_3_16_0_1_1452502996007_41728"><br class="" id="yui_3_16_0_1_1452502996007_41730"><br class="" id="yui_3_16_0_1_1452502996007_41732"><br class="" id="yui_3_16_0_1_1452502996007_41734">function edit1_Callback(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_41736">% hObject    handle to edit1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_41738">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41740">% handles    structure with handles and user data (see GUIDATA)<br class="" id="yui_3_16_0_1_1452502996007_41742"><br class="" id="yui_3_16_0_1_1452502996007_41744">% Hints: get(hObject,'String') returns contents of edit1 as text<br class="" id="yui_3_16_0_1_1452502996007_41746">%        str2double(get(hObject,'String')) returns contents of edit1 as a double<br class="" id="yui_3_16_0_1_1452502996007_41748"><br class="" id="yui_3_16_0_1_1452502996007_41750"><br class="" id="yui_3_16_0_1_1452502996007_41752">% --- Executes during object creation, after setting all properties.<br class="" id="yui_3_16_0_1_1452502996007_41754">function edit1_CreateFcn(hObject, eventdata, handles)<br class="" id="yui_3_16_0_1_1452502996007_41756">% hObject    handle to edit1 (see GCBO)<br class="" id="yui_3_16_0_1_1452502996007_41758">% eventdata  reserved - to be defined in a future version of MATLAB<br class="" id="yui_3_16_0_1_1452502996007_41760">% handles    empty - handles not created until after all CreateFcns called<br class="" id="yui_3_16_0_1_1452502996007_41762"><br class="" id="yui_3_16_0_1_1452502996007_41764">% Hint: edit controls usually have a white background on Windows.<br class="" id="yui_3_16_0_1_1452502996007_41766">%       See ISPC and COMPUTER.<br class="" id="yui_3_16_0_1_1452502996007_41768">if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))<br class="" id="yui_3_16_0_1_1452502996007_41770">    set(hObject,'BackgroundColor','white');<br class="" id="yui_3_16_0_1_1452502996007_41772">end<br class="" id="yui_3_16_0_1_1452502996007_41774"></font></font><br></span></span></font></font></font></font></div></div></div></div></body></html>