function spm_SVMCrossVal % Initialize and hide the GUI as it is being constructed. frameWidth=450; frameHeight=600; frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]); movegui(frame,'west'); % get this thing visible on smaller displays. set(frame,'Name','SVMCrossVal Decode Performance 4 SPM'); set(frame,'NumberTitle','off'); set(frame,'MenuBar','none'); set(frame,'Color',get(0,'defaultUicontrolBackgroundColor')); set(frame,'Resize','off'); set(frame,'Units','normalize'); model.subjectMap = SubjectRoiMapping; nElementRows = 24; optionLineHeight = 1.0/nElementRows; controlElementHeight=optionLineHeight*(1.0/1.5)*frameHeight; pSubject = uipanel(frame,'Title','Subject', 'Position',[0 optionLineHeight*19 frameWidth optionLineHeight*5]); pPSTH = uipanel(frame,'Title','PSTH Options', 'Position',[0 optionLineHeight*14 frameWidth optionLineHeight*5]); pCLASS = uipanel(frame,'Title','Class Definitions','Position',[0 optionLineHeight*9 frameWidth optionLineHeight*5]); pVOXEL = uipanel(frame,'Title','Voxel Selector', 'Position',[0 optionLineHeight*3 frameWidth optionLineHeight*6]); pSVM = uipanel(frame,'Title','SVM Options', 'Position',[0 optionLineHeight*1 frameWidth optionLineHeight*2]); btnRunButton = uicontrol(frame,'Tag','run','String','run decode-performance visualiser','Position',[2 optionLineHeight*0 frameWidth controlElementHeight*1.6]); % Subject firstColumn = 5.00; firstRow = 1.00 * controlElementHeight; model.subjectSelector = uicontrol(pSubject,'Style','listbox',... 'Min',1, 'Max',3,... 'String',getSubjectCellList(model.subjectMap),... 'Value',5,... % default selected item 'Position',[firstColumn firstRow 0.66*frameWidth controlElementHeight*6]); set(model.subjectSelector,'BackgroundColor','w'); model.txtSmoothed = createTextField(pSubject,[0.68*frameWidth firstRow 0.25*frameWidth controlElementHeight],'0'); % PSTH firstColumn = 5.00; secondColumn = 0.33*frameWidth; thirdColumn = 0.66*frameWidth; % fourthColumn = 0.84*frameWidth; firstRow = 5.5*controlElementHeight; secondRow = 4.5*controlElementHeight; thirdRow = 3.5*controlElementHeight; fourthRow = 2.5*controlElementHeight; fifthRow = 1.0*controlElementHeight; lStart = createLabel(pPSTH, [secondColumn firstRow 0.33*frameWidth controlElementHeight],'Start [sec]'); lEnd = createLabel(pPSTH, [thirdColumn firstRow 0.33*frameWidth controlElementHeight],'End [sec]'); lPSTH = createLabel(pPSTH, [firstColumn secondRow 0.33*frameWidth controlElementHeight],'PSTH Range'); lBaseline = createLabel(pPSTH, [firstColumn thirdRow 0.33*frameWidth controlElementHeight],'Baseline'); lFrameShift = createLabel(pPSTH, [firstColumn fourthRow 0.33*frameWidth controlElementHeight],'SVM Frame Shift'); lFramsSize = createLabel(pPSTH, [firstColumn fifthRow 0.33*frameWidth controlElementHeight],'SVM Frame Size'); model.txtBaselineStart = createTextField(pPSTH,[secondColumn thirdRow 0.25*frameWidth controlElementHeight],'-22.0'); model.txtBaselineEnd = createTextField(pPSTH,[thirdColumn thirdRow 0.25*frameWidth controlElementHeight],'-20.0'); model.txtPSTHStart = createTextField(pPSTH,[secondColumn secondRow 0.25*frameWidth controlElementHeight],'-25.0'); model.txtPSTHEnd = createTextField(pPSTH,[thirdColumn secondRow 0.25*frameWidth controlElementHeight],' 20.0'); model.txtFrameShiftStart = createTextField(pPSTH,[secondColumn fourthRow 0.25*frameWidth controlElementHeight],'-20.0'); model.txtFrameShiftEnd = createTextField(pPSTH,[thirdColumn fourthRow 0.25*frameWidth controlElementHeight],' 15.0'); model.txtFrameShiftDur = createTextField(pPSTH,[secondColumn fifthRow 0.25*frameWidth controlElementHeight],' 0'); %Classes nClassRows = 6; firstColumn = 5.00; firstRow = (nClassRows-0.5)*controlElementHeight; secondRow = (nClassRows-4.5)*controlElementHeight; lClassDef = createLabel(pCLASS, [firstColumn firstRow 0.66*frameWidth controlElementHeight],'