Home > . > prt_ui_results.m

prt_ui_results

PURPOSE ^

PRT_UI_RESULTS MATLAB code for prt_ui_results.fig

SYNOPSIS ^

function varargout = prt_ui_results(varargin)

DESCRIPTION ^

 PRT_UI_RESULTS MATLAB code for prt_ui_results.fig

 PRT_UI_RESULTS, by itself, creates a new PRT_UI_RESULTS or raises the
 existing singleton*.

 H = PRT_UI_RESULTS returns the handle to a new PRT_UI_RESULTS or the
 handle to the existing singleton*.

 PRT_UI_RESULTS('CALLBACK',hObject,eventData,handles,...) calls the local
 function named CALLBACK in PRT_UI_RESULTS.M with the given input arguments.

 PRT_UI_RESULTS('Property','Value',...) creates a new PRT_UI_RESULTS or
 raises the existing singleton*.  Starting from the left, property value
 pairs are applied to the GUI before prt_ui_results_OpeningFcn gets called.
 An unrecognized property name or invalid value makes property application
 stop.  All inputs are passed to prt_ui_results_OpeningFcn via varargin.

 *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
 instance to run (singleton)".

 See also: GUIDE, GUIDATA, GUIHANDLES
__________________________________________________________________________
 Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = prt_ui_results(varargin)
0002 % PRT_UI_RESULTS MATLAB code for prt_ui_results.fig
0003 %
0004 % PRT_UI_RESULTS, by itself, creates a new PRT_UI_RESULTS or raises the
0005 % existing singleton*.
0006 %
0007 % H = PRT_UI_RESULTS returns the handle to a new PRT_UI_RESULTS or the
0008 % handle to the existing singleton*.
0009 %
0010 % PRT_UI_RESULTS('CALLBACK',hObject,eventData,handles,...) calls the local
0011 % function named CALLBACK in PRT_UI_RESULTS.M with the given input arguments.
0012 %
0013 % PRT_UI_RESULTS('Property','Value',...) creates a new PRT_UI_RESULTS or
0014 % raises the existing singleton*.  Starting from the left, property value
0015 % pairs are applied to the GUI before prt_ui_results_OpeningFcn gets called.
0016 % An unrecognized property name or invalid value makes property application
0017 % stop.  All inputs are passed to prt_ui_results_OpeningFcn via varargin.
0018 %
0019 % *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
0020 % instance to run (singleton)".
0021 %
0022 % See also: GUIDE, GUIDATA, GUIHANDLES
0023 %__________________________________________________________________________
0024 % Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory
0025 
0026 % Written by M. J. Rosa
0027 % $Id$
0028 
0029 % Edit the above text to modify the response to help prt_ui_results
0030 
0031 % Last Modified by GUIDE v2.5 13-Feb-2013 10:55:43
0032 
0033 % Begin initialization code - DO NOT EDIT
0034 gui_Singleton = 1;
0035 gui_State = struct('gui_Name',       mfilename, ...
0036     'gui_Singleton',  gui_Singleton, ...
0037     'gui_OpeningFcn', @prt_ui_results_OpeningFcn, ...
0038     'gui_OutputFcn',  @prt_ui_results_OutputFcn, ...
0039     'gui_LayoutFcn',  [] , ...
0040     'gui_Callback',   []);
0041 if nargin && ischar(varargin{1})
0042     gui_State.gui_Callback = str2func(varargin{1});
0043 end
0044 
0045 if nargout
0046     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0047 else
0048     gui_mainfcn(gui_State, varargin{:});
0049 end
0050 % End initialization code - DO NOT EDIT
0051 
0052 
0053 % --- Executes just before prt_ui_results is made visible.
0054 function prt_ui_results_OpeningFcn(hObject, eventdata, handles, varargin)
0055 % This function has no output args, see OutputFcn.
0056 % hObject    handle to figure
0057 % eventdata  reserved - to be defined in a future version of MATLAB
0058 % handles    structure with handles and user data (see GUIDATA)
0059 % varargin   command line arguments to prt_ui_results (see VARARGIN)
0060 
0061 %if window already exists, just put it as the current figure
0062 Tag='Results';
0063 F = findall(allchild(0),'Flat','Tag',Tag);
0064 if length(F) > 1
0065     % Multiple Graphics windows - close all but most recent
0066     close(F(2:end))
0067     F = F(1);
0068     uistack(F,'top')
0069 elseif length(F)==1
0070     uistack(F,'top')
0071 else
0072     set(handles.figure1,'Tag',Tag)
0073     set(handles.figure1,'Name','PRoNTo :: Results')
0074     set(handles.figure1,'MenuBar','figure','WindowStyle','normal');
0075     
0076     %set size of the window, taking screen resolution and platform into account
0077     %--------------------------------------------------------------------------
0078     S0= spm('WinSize','0',1);   %-Screen size (of the current monitor)
0079     if ispc
0080         PF='MS Sans Serif';
0081     else
0082         PF= spm_platform('fonts');     %-Font names (for this platform)
0083         PF=PF.helvetica;
0084     end
0085     tmp  = [S0(3)/1280 (S0(4))/800];
0086     ratio=min(tmp)*[1 1 1 1];
0087     FS = 1 + 0.85*(min(ratio)-1);  %factor to scale the fonts
0088     x=get(handles.figure1,'Position');
0089     set(handles.figure1,'Position',ratio.*x)
0090     set(handles.figure1,'Resize','on')
0091     
0092     
0093     color=prt_get_defaults('color');
0094     set(handles.figure1,'Color',color.bg1)
0095     aa=get(handles.figure1,'children');
0096     for i=1:length(aa)
0097         if strcmpi(get(aa(i),'type'),'uipanel')
0098             set(aa(i),'BackgroundColor',color.bg2)
0099             bb=get(aa(i),'children');
0100             if ~isempty(bb)
0101                 for j=1:length(bb)
0102                     if strcmpi(get(bb(j),'type'),'uipanel')
0103                         cc=get(bb(j),'children');
0104                         set(bb(j),'BackgroundColor',color.bg2)
0105                         for k=1:length(cc)
0106                             if strcmpi(get(cc(k),'type'),'uipanel')
0107                                 dd=get(cc(k),'children');
0108                                 set(cc(k),'BackgroundColor',color.bg2)
0109                                 for l=1:length(dd)
0110                                     if strcmpi(get(dd(l),'type'),'uicontrol')
0111                                         if ~isempty(find(strcmpi(get(dd(l),'Style'),{'text',...
0112                                                 'radiobutton','checkbox'})))
0113                                             set(dd(l),'BackgroundColor',color.bg2)
0114                                         elseif ~isempty(find(strcmpi(get(dd(l),'Style'),'pushbutton')))
0115                                             set(dd(l),'BackgroundColor',color.fr)
0116                                         end
0117                                     end
0118                                     set(dd(l),'FontUnits','pixel')
0119                                     xf=get(dd(l),'FontSize');
0120                                     if ispc
0121                                         set(dd(l),'FontSize',ceil(FS*xf),'FontName',PF,...
0122                                             'FontUnits','normalized','Units','normalized')
0123                                     else
0124                                         set(dd(l),'FontSize',ceil(FS*xf),'FontName',PF,...
0125                                             'Units','normalized')
0126                                     end
0127                                 end
0128                             elseif strcmpi(get(cc(k),'type'),'uicontrol') && ...
0129                                     ~isempty(find(strcmpi(get(cc(k),'Style'),{'text',...
0130                                     'radiobutton','checkbox'})))
0131                                 set(cc(k),'BackgroundColor',color.bg2)
0132                             elseif strcmpi(get(cc(k),'type'),'uicontrol')&& ...
0133                                     ~isempty(find(strcmpi(get(cc(k),'Style'),'pushbutton')))
0134                                 set(cc(k),'BackgroundColor',color.fr)
0135                             end
0136                             set(cc(k),'FontUnits','pixel')
0137                             xf=get(cc(k),'FontSize');
0138                             set(cc(k),'FontSize',ceil(FS*xf),'FontName',PF,...
0139                                 'Units','normalized')
0140                         end
0141                     elseif strcmpi(get(bb(j),'type'),'uicontrol') && ...
0142                             ~isempty(find(strcmpi(get(bb(j),'Style'),{'text',...
0143                             'radiobutton','checkbox'})))
0144                         set(bb(j),'BackgroundColor',color.bg2)
0145                     elseif strcmpi(get(bb(j),'type'),'uicontrol') && ...
0146                             ~isempty(find(strcmpi(get(bb(j),'Style'),'pushbutton')))
0147                         set(bb(j),'BackgroundColor',color.fr)
0148                     end
0149                     set(bb(j),'FontUnits','pixel')
0150                     xf=get(bb(j),'FontSize');
0151                     set(bb(j),'FontSize',ceil(FS*xf),'FontName',PF,...
0152                         'Units','normalized')
0153                 end
0154             end
0155         elseif strcmpi(get(aa(i),'type'),'uicontrol')
0156             if ~isempty(find(strcmpi(get(aa(i),'Style'),{'text',...
0157                     'radiobutton','checkbox'})))
0158                 set(aa(i),'BackgroundColor',color.bg1)
0159             elseif ~isempty(find(strcmpi(get(aa(i),'Style'),'pushbutton')))
0160                 set(aa(i),'BackgroundColor',color.fr)
0161             end
0162         end
0163         if ~strcmpi(get(aa(i),'type'),'uimenu')
0164             set(aa(i),'FontUnits','pixel')
0165             xf=get(aa(i),'FontSize');
0166             set(aa(i),'FontSize',ceil(FS*xf),'FontName',PF,...
0167                 'Units','normalized')
0168         end
0169     end
0170     
0171     
0172     % Initialize window
0173     % -------------------------------------------------------------------------
0174     
0175     if ~isfield(handles,'notinit')
0176         
0177         % Load PRT.mat
0178         PRT     = spm_select(1,'mat','Select PRT.mat',[],pwd,'PRT.mat');
0179         pathdir = regexprep(PRT,'PRT.mat', '');
0180         handles.pathdir = pathdir;
0181         handles.prtdir=fileparts(PRT);
0182         load(PRT);
0183         
0184         % Save PRT
0185         handles.PRT = PRT;
0186         
0187         % Flag to load new weights
0188         handles.noloadw = 0;
0189         
0190         % Load model names
0191         if ~isfield(PRT,'model')
0192             error('No models found in PRT.mat!')
0193         end
0194         nmodels = length(PRT.model);
0195         mi  = [];
0196         nmi = 0;
0197         for m = 1:nmodels
0198             if isfield(PRT.model(m),'input') && ~isempty(PRT.model(m).input)
0199                 if isfield(PRT.model(m),'output') && ~isempty(PRT.model(m).output)
0200                     nmi = nmi +1;
0201                     model_name{nmi} = PRT.model(m).model_name;
0202                     mi = [mi, m];
0203                 else
0204                     beep;
0205                     disp(sprintf('Model %s not estimated! It will not be displayed',PRT.model(m).model_name));
0206                 end
0207             else
0208                 beep;
0209                 disp(sprintf('Model %s not properly specified! It will not be displayed',PRT.model(m).model_name));
0210             end
0211             
0212         end
0213         if ~nmi, error('There are no estimated/good models in this PRT!'); end
0214         
0215         handles.mi = mi;
0216         
0217         % Set model pulldown menu
0218         handles.mnames = model_name;
0219         set(handles.classmenu,'String',handles.mnames);
0220         
0221         % Get folds pulldown menu
0222         m             = get(handles.classmenu,'Value');
0223         handles.nfold = length(PRT.model(mi(m)).output.fold);
0224         folds{1}      = 'All folds / Average';
0225         for f = 1:handles.nfold
0226             folds{f+1} = num2str(f);
0227         end
0228         handles.folds = folds;
0229         set(handles.foldmenu,'String',handles.folds);
0230         
0231         % Set plots menu for first model
0232         if strcmp(PRT.model(mi(m)).input.type,'classification');
0233             if length(PRT.model(mi(m)).output.stats.c_acc) <= 2 ;
0234                 plots = {'Histogram','Confusion Matrix','Predictions','ROC'};
0235             else
0236                 plots = {'Histogram','Confusion Matrix','Predictions'};
0237             end
0238         else
0239             plots = {'Predictions (scatter)', 'Predictions (bar)', 'Predictions (line)'};
0240         end
0241         if isfield(PRT.model(mi(m)).input,'use_nested_cv')
0242             if PRT.model(mi(m)).input.use_nested_cv
0243                 plots{length(plots)+1} = 'Influence of the hyper-parameter on performance';
0244             end
0245         end
0246         set(handles.plotmenu,'String',plots);
0247         
0248         % Initialize model button
0249         handles.model_button = 0;
0250         
0251         % Set the 'save permutations' weights' chackbox to 0
0252         handles.save_weights = 0;
0253         set(handles.save_perm_weights,'Value',0);
0254         %         set(handles.save_perm_weights,'Visible','off');
0255         %         set(handles.save_perm_weights,'Enable','off');
0256         
0257         % Clear axes
0258         cla(handles.axes5);
0259     end
0260 end
0261 
0262 % Choose default command line output for prt_ui_results
0263 handles.output = hObject;
0264 
0265 % Update handles structure
0266 guidata(hObject, handles);
0267 
0268 % UIWAIT makes prt_ui_results wait for user response (see UIRESUME)
0269 % uiwait(handles.figure1);
0270 
0271 
0272 % --- Outputs from this function are returned to the command line.
0273 function varargout = prt_ui_results_OutputFcn(hObject, eventdata, handles)
0274 % varargout  cell array for returning output args (see VARARGOUT);
0275 % hObject    handle to figure
0276 % eventdata  reserved - to be defined in a future version of MATLAB
0277 % handles    structure with handles and user data (see GUIDATA)
0278 
0279 % Get default command line output from handles structure
0280 varargout{1} = handles.output;
0281 
0282 
0283 % --- Executes on button press in originbutton.
0284 function originbutton_Callback(hObject, eventdata, handles)
0285 % hObject    handle to originbutton (see GCBO)
0286 % eventdata  reserved - to be defined in a future version of MATLAB
0287 % handles    structure with handles and user data (see GUIDATA)
0288 
0289 % Reset the crosshairs position
0290 % -------------------------------------------------------------------------
0291 if isfield(handles,'img')
0292     spm_orthviews('Reposition',[0 0 0]);
0293 end
0294 
0295 function mmedit_Callback(hObject, eventdata, handles)
0296 % hObject    handle to mmedit (see GCBO)
0297 % eventdata  reserved - to be defined in a future version of MATLAB
0298 % handles    structure with handles and user data (see GUIDATA)
0299 
0300 % Hints: get(hObject,'String') returns contents of mmedit as text
0301 %        str2double(get(hObject,'String')) returns contents of mmedit as a double
0302 
0303 % Move crosshairs position in mm
0304 % -------------------------------------------------------------------------
0305 if isfield(handles,'img')
0306     mp    = handles.mmedit;
0307     posmm = get(mp,'String');
0308     pos = sscanf(posmm, '%g %g %g');
0309     if length(pos)~=3
0310         pos = spm_orthviews('Pos');
0311     end
0312     spm_orthviews('Reposition',pos);
0313 end
0314 
0315 % --- Executes during object creation, after setting all properties.
0316 function mmedit_CreateFcn(hObject, eventdata, handles)
0317 % hObject    handle to mmedit (see GCBO)
0318 % eventdata  reserved - to be defined in a future version of MATLAB
0319 % handles    empty - handles not created until after all CreateFcns called
0320 
0321 % Hint: edit controls usually have a white background on Windows.
0322 %       See ISPC and COMPUTER.
0323 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0324     set(hObject,'BackgroundColor','white');
0325 end
0326 
0327 
0328 function vxedit_Callback(hObject, eventdata, handles)
0329 % hObject    handle to vxedit (see GCBO)
0330 % eventdata  reserved - to be defined in a future version of MATLAB
0331 % handles    structure with handles and user data (see GUIDATA)
0332 
0333 % Hints: get(hObject,'String') returns contents of vxedit as text
0334 %        str2double(get(hObject,'String')) returns contents of vxedit as a double
0335 
0336 % Move crosshairs position in vx
0337 % -------------------------------------------------------------------------
0338 if isfield(handles,'img')
0339     mp    = handles.vxedit;
0340     posvx = get(mp,'String');
0341     pos   = sscanf(posvx, '%g %g %g');
0342     if length(pos)~=3
0343         pos = spm_orthviews('pos',1);
0344     end
0345     tmp = handles.vols{1}.mat;
0346     pos = tmp(1:3,:)*[pos ; 1];
0347     spm_orthviews('Reposition',pos);
0348 end
0349 
0350 
0351 % --- Executes during object creation, after setting all properties.
0352 function vxedit_CreateFcn(hObject, eventdata, handles)
0353 % hObject    handle to vxedit (see GCBO)
0354 % eventdata  reserved - to be defined in a future version of MATLAB
0355 % handles    empty - handles not created until after all CreateFcns called
0356 
0357 % Hint: edit controls usually have a white background on Windows.
0358 %       See ISPC and COMPUTER.
0359 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0360     set(hObject,'BackgroundColor','white');
0361 end
0362 
0363 
0364 
0365 % --- Executes on button press in helpbutton.
0366 function helpbutton_Callback(hObject, eventdata, handles)
0367 % hObject    handle to helpbutton (see GCBO)
0368 % eventdata  reserved - to be defined in a future version of MATLAB
0369 % handles    structure with handles and user data (see GUIDATA)
0370 
0371 disp('Help window for PRoNTo results has been launched.')
0372 prt_ui_results_help;
0373 
0374 % --- Executes on button press in quitbutton.
0375 function quitbutton_Callback(hObject, eventdata, handles)
0376 % hObject    handle to quitbutton (see GCBO)
0377 % eventdata  reserved - to be defined in a future version of MATLAB
0378 % handles    structure with handles and user data (see GUIDATA)
0379 
0380 % Close and clear figure
0381 % -------------------------------------------------------------------------
0382 close(handles.figure1);
0383 
0384 
0385 function loadweight_Callback(hObject, eventdata, handles)
0386 % hObject    handle to loadweight (see GCBO)
0387 % eventdata  reserved - to be defined in a future version of MATLAB
0388 % handles    structure with handles and user data (see GUIDATA)
0389 
0390 % Hints: get(hObject,'String') returns contents of loadweight as text
0391 %        str2double(get(hObject,'String')) returns contents of loadweight as a double
0392 
0393 
0394 % --- Executes during object creation, after setting all properties.
0395 function loadweight_CreateFcn(hObject, eventdata, handles)
0396 % hObject    handle to loadweight (see GCBO)
0397 % eventdata  reserved - to be defined in a future version of MATLAB
0398 % handles    empty - handles not created until after all CreateFcns called
0399 
0400 % Hint: edit controls usually have a white background on Windows.
0401 %       See ISPC and COMPUTER.
0402 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0403     set(hObject,'BackgroundColor','white');
0404 end
0405 
0406 
0407 % --- Executes on button press in weightbutton.
0408 function weightbutton_Callback(hObject, eventdata, handles)
0409 % hObject    handle to weightbutton (see GCBO)
0410 % eventdata  reserved - to be defined in a future version of MATLAB
0411 % handles    structure with handles and user data (see GUIDATA)
0412 
0413 disp('Loading weights...>>')
0414 % Select results (.img) for weight map
0415 % -------------------------------------------------------------------------
0416 if ~isfield(handles,'wmap') || ~handles.noloadw
0417     wmap            = spm_select(1,'image','Select weight map.');
0418     % Remove number in file name
0419     if strcmp(wmap(end-1),',')
0420         wmap = wmap(1:end-2);
0421     end
0422     V               = spm_vol(wmap);
0423     handles.vols{1} = V;
0424     handles.wmap    = wmap;
0425     
0426 end
0427 
0428 spm_orthviews('Reset');
0429 if isfield(handles,'aimg')
0430     anatomicalbutton_Callback(hObject, eventdata, handles);
0431 end
0432 
0433 % Image dimensions
0434 % -------------------------------------------------------------------------
0435 fold          = get(handles.foldmenu,'Value')-1;
0436 Vfolds        = handles.vols{1};
0437 V             = Vfolds(1);
0438 M             = V.mat;
0439 DIM           = V.dim(1:3)';
0440 xdim          = DIM(1); ydim  = DIM(2); zdim  = DIM(3);
0441 if length(V.private.dat.dim) < 4
0442     fdim = 1;                       % Handle 3D images
0443 else
0444     fdim = V.private.dat.dim(4);    % Handle 4D images
0445 end
0446 [xords,yords] = ndgrid(1:xdim,1:ydim);
0447 xords         = xords(:)';  yords = yords(:)';
0448 I             = 1:xdim*ydim;
0449 zords_init    = ones(1,xdim*ydim);
0450 
0451 % Get image values above zero for each fold and all folds
0452 % -------------------------------------------------------------------------
0453 xyz_above = [];
0454 z_above   = [];
0455 if fold == 0,
0456     fold_coord = fdim*ones(1,xdim*ydim);
0457     V = Vfolds(fdim);
0458 else
0459     fold_coord = fold*ones(1,xdim*ydim);
0460     V = Vfolds(fold);
0461 end
0462 
0463 for z = 1:zdim,
0464     zords = z*zords_init;
0465     xyz   = [xords(I); yords(I); zords(I); fold_coord];
0466     zvals = spm_get_data(V,xyz);
0467     above = find(~isnan(zvals));
0468     if length(above)==length(zvals) %old version of weight computation
0469         above = find(zvals~=0);
0470     end
0471     if ~isempty(above)
0472         xyz_above = [xyz_above,xyz(:,above)];
0473         z_above   = [z_above,zvals(above)];
0474     end
0475 end
0476 XYZ   = xyz_above(1:3,:);
0477 Z     = z_above;
0478 
0479 % Set spm_orthviews properties
0480 % -------------------------------------------------------------------------
0481 rotate3d off
0482 global st
0483 
0484 handles.notinit = 1;
0485 handles.img     = 1;
0486 
0487 st.handles  = handles;
0488 st.fig      = handles.figure1;
0489 st.V        = V;
0490 st.callback = 'prt_ui_results(''showpos'')';
0491 
0492 % Display maps
0493 % -------------------------------------------------------------------------
0494 h  = spm_orthviews('Image', handles.wmap,[0.0619 0.0859 0.40 0.4196]);
0495 handles.wimgh = h;
0496 spm_orthviews('AddContext', h);
0497 spm_orthviews('MaxBB');
0498 spm_orthviews('AddBlobs', h, XYZ, Z, M);
0499 cmap = get(gcf,'Colormap');
0500 if size(cmap,1)~=128
0501     spm_figure('Colormap','jet');
0502 end
0503 spm_orthviews('Redraw');
0504 
0505 % Show positions
0506 % -------------------------------------------------------------------------
0507 prt_ui_results('showpos');
0508 
0509 disp('Done');
0510 
0511 % Reset flag to load weights
0512 handles.noloadw = 1;
0513 
0514 % Show file name
0515 % -------------------------------------------------------------------------
0516 set(handles.loadweight,'String',handles.wmap);
0517 guidata(hObject, handles);
0518 
0519 function loadanatomical_Callback(hObject, eventdata, handles)
0520 % hObject    handle to loadanatomical (see GCBO)
0521 % eventdata  reserved - to be defined in a future version of MATLAB
0522 % handles    structure with handles and user data (see GUIDATA)
0523 
0524 % Hints: get(hObject,'String') returns contents of loadanatomical as text
0525 %        str2double(get(hObject,'String')) returns contents of loadanatomical as a double
0526 
0527 
0528 % --- Executes during object creation, after setting all properties.
0529 function loadanatomical_CreateFcn(hObject, eventdata, handles)
0530 % hObject    handle to loadanatomical (see GCBO)
0531 % eventdata  reserved - to be defined in a future version of MATLAB
0532 % handles    empty - handles not created until after all CreateFcns called
0533 
0534 % Hint: edit controls usually have a white background on Windows.
0535 %       See ISPC and COMPUTER.
0536 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0537     set(hObject,'BackgroundColor','white');
0538 end
0539 
0540 
0541 % --- Executes on button press in anatomicalbutton.
0542 function anatomicalbutton_Callback(hObject, eventdata, handles)
0543 % hObject    handle to anatomicalbutton (see GCBO)
0544 % eventdata  reserved - to be defined in a future version of MATLAB
0545 % handles    structure with handles and user data (see GUIDATA)
0546 
0547 % Check if weight map and anatomical image exist and reset orthviews
0548 % -------------------------------------------------------------------------
0549 if ~isfield(handles,'wmap')
0550     spm_orthviews('Reset');
0551 end
0552 global st
0553 st.fig = handles.figure1;
0554 if ~isfield(handles,'aimg') || ~handles.noloadi
0555     img    = spm_select(1,'image','Select anatomical image.');
0556 else
0557     img = handles.aimg;
0558 end
0559 
0560 % Show anatomical image
0561 % -------------------------------------------------------------------------
0562 rotate3d off
0563 st.fig = handles.figure1;
0564 handle = spm_orthviews('Image', img, [0.5295 0.0859 0.4196 0.4196]);
0565 cmap   = get(gcf,'Colormap');
0566 if size(cmap,1)~=128
0567     spm_figure('Colormap','gray')
0568 end
0569 
0570 handles.aimgh   = handle;
0571 handles.aimg    = img;
0572 handles.img     = 1;
0573 handles.noloadi = 1;
0574 
0575 % Show file name
0576 % -------------------------------------------------------------------------
0577 set(handles.loadanatomical,'String',handles.aimg);
0578 
0579 guidata(hObject, handles);
0580 
0581 
0582 % --- Executes on selection change in foldmenu.
0583 function foldmenu_Callback(hObject, eventdata, handles)
0584 % hObject    handle to foldmenu (see GCBO)
0585 % eventdata  reserved - to be defined in a future version of MATLAB
0586 % handles    structure with handles and user data (see GUIDATA)
0587 
0588 % Hints: contents = cellstr(get(hObject,'String')) returns foldmenu contents as cell array
0589 %        contents{get(hObject,'Value')} returns selected item from foldmenu
0590 
0591 % Change weight map
0592 % -------------------------------------------------------------------------
0593 if ~handles.model_button
0594     if isfield(handles,'vols')
0595         handles.noloadw = 1;
0596         weightbutton_Callback(hObject, eventdata, handles);
0597     end
0598 end
0599 
0600 % Change plot
0601 % -------------------------------------------------------------------------
0602 if isfield(handles,'plot')
0603     plotmenu_Callback(hObject, eventdata, handles);
0604 end
0605 
0606 % Change stats
0607 % -------------------------------------------------------------------------
0608 if isfield(handles,'stats')
0609     statsbutton_Callback(hObject, eventdata, handles);
0610 end
0611 
0612 % --- Executes during object creation, after setting all properties.
0613 function foldmenu_CreateFcn(hObject, eventdata, handles)
0614 % hObject    handle to foldmenu (see GCBO)
0615 % eventdata  reserved - to be defined in a future version of MATLAB
0616 % handles    empty - handles not created until after all CreateFcns called
0617 
0618 % Hint: popupmenu controls usually have a white background on Windows.
0619 %       See ISPC and COMPUTER.
0620 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0621     set(hObject,'BackgroundColor','white');
0622 end
0623 
0624 
0625 % --- Executes on selection change in plotmenu.
0626 function plotmenu_Callback(hObject, eventdata, handles)
0627 % hObject    handle to plotmenu (see GCBO)
0628 % eventdata  reserved - to be defined in a future version of MATLAB
0629 % handles    structure with handles and user data (see GUIDATA)
0630 
0631 % Hints: contents = cellstr(get(hObject,'String')) returns plotmenu contents as cell array
0632 %        contents{get(hObject,'Value')} returns selected item from plotmenu
0633 
0634 plotm         = get(handles.plotmenu,'Value');
0635 plotchosen    = num2str(plotm);
0636 fold          = get(handles.foldmenu,'Value');
0637 model         = get(handles.classmenu,'Value');
0638 mi            = handles.mi;
0639 model         = mi(model);
0640 PRT           = handles.PRT;
0641 handles.plot  = 1;
0642 nms           = 7;
0643 isyc1         = 0;
0644 isyc2         = 0;
0645 c1            = 0;
0646 c2            = 0;
0647 rotate3d off
0648 
0649 if strcmp(PRT.model(model).input.type,'classification')
0650     %     mclass        = length(handles.PRT.model(model).output.stats.c_acc);
0651     %     if mclass ~= 2
0652     %         multiplot  = 4;
0653     %         plotchosen = num2str(multiplot(plotm));
0654     %     end
0655     
0656     % Check if the model has hyper-parameter optimization
0657     if (~isfield(handles.PRT.model(model).input,'use_nested_cv') || ...
0658             ~handles.PRT.model(model).input.use_nested_cv) && plotchosen == '4'
0659         plotchosen = '1';
0660     end
0661     
0662     % Plot
0663     % ---------------------------------------------------------------------
0664     switch plotchosen
0665         
0666         
0667         % Histograms
0668         % -----------------------------------------------------------------
0669         case '1'
0670             prt_plot_histograms(handles.PRT, model, fold, handles.axes5);
0671             
0672             % Confusion matrix
0673             % -------------------------------------------------------------
0674         case '2'
0675             prt_plot_confusion_matrix(handles.PRT, model, fold, handles.axes5);
0676             
0677             % Predictions
0678             % -------------------------------------------------------------
0679         case '3'
0680             prt_plot_prediction(handles.PRT, model, fold, nms, handles.axes5);
0681             
0682             % ROC / AUC
0683             % -------------------------------------------------------------
0684         case '4'
0685             prt_plot_ROC(handles.PRT, model, fold, handles.axes5);
0686             
0687             % TODO: Check if this does not cause problems when the
0688             % Influence of the hyper-parameter on performance was not used
0689         case '5'
0690             prt_plot_nested_cv(handles.PRT, model, fold, handles.axes5);
0691             
0692     end
0693     
0694 else
0695     
0696     % Plot
0697     % ---------------------------------------------------------------------
0698     switch plotchosen
0699         case '1'
0700             prt_plot_prediction_reg_scatter(handles.PRT, model, handles.axes5);
0701             
0702         case '2'
0703             prt_plot_prediction_reg_bar(handles.PRT, model, handles.axes5);
0704             
0705         case '3'
0706             prt_plot_prediction_reg_line(handles.PRT, model, handles.axes5);
0707             
0708             % TODO: Check if this does not cause problems when the
0709             % nested CV was not used
0710         case '4'
0711             prt_plot_nested_cv(handles.PRT, model, fold, handles.axes5);
0712             
0713     end
0714 end
0715 
0716 guidata(hObject, handles);
0717 
0718 
0719 % --- Executes during object creation, after setting all properties.
0720 function plotmenu_CreateFcn(hObject, eventdata, handles)
0721 % hObject    handle to plotmenu (see GCBO)
0722 % eventdata  reserved - to be defined in a future version of MATLAB
0723 % handles    empty - handles not created until after all CreateFcns called
0724 
0725 % Hint: popupmenu controls usually have a white background on Windows.
0726 %       See ISPC and COMPUTER.
0727 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0728     set(hObject,'BackgroundColor','white');
0729 end
0730 
0731 
0732 % --- Executes on selection change in classmenu.
0733 function classmenu_Callback(hObject, eventdata, handles)
0734 % hObject    handle to classmenu (see GCBO)
0735 % eventdata  reserved - to be defined in a future version of MATLAB
0736 % handles    structure with handles and user data (see GUIDATA)
0737 
0738 % Hints: contents = cellstr(get(hObject,'String')) returns classmenu contents as cell array
0739 %        contents{get(hObject,'Value')} returns selected item from classmenu
0740 
0741 % Hints: contents = cellstr(get(hObject,'String')) returns classmenu contents as cell array
0742 %        contents{get(hObject,'Value')} returns selected item from classmenu
0743 
0744 % Get folds
0745 m  = get(handles.classmenu,'Value');
0746 mi = handles.mi;
0747 if length(handles.PRT.model(mi(m)).output)>1
0748     beep
0749     disp('Cannot display results per kernel in results window')
0750     return
0751 end
0752 handles.nfold = length(handles.PRT.model(mi(m)).output.fold);
0753 
0754 
0755 folds{1}      = 'All folds / Average';
0756 for f = 1:handles.nfold
0757     folds{f+1} = num2str(f);
0758 end
0759 
0760 % Set plots menu for first model
0761 if strcmp(handles.PRT.model(mi(m)).input.type,'classification');
0762     if length(handles.PRT.model(mi(m)).output(1).stats.c_acc) <= 2 ;
0763         plots = {'Histogram','Confusion Matrix','Predictions','ROC'};
0764     else
0765         plots = {'Histogram', 'Confusion Matrix'};
0766     end
0767 else
0768     plots = {'Predictions (scatter)', 'Predictions (bar)', 'Predictions (line)'};
0769 end
0770 if isfield(handles.PRT.model(mi(m)).input,'use_nested_cv')
0771     if handles.PRT.model(mi(m)).input.use_nested_cv
0772         plots{length(plots)+1} = 'Influence of the hyper-parameter on performance';
0773     end
0774 end
0775 
0776 set(handles.plotmenu,'String',plots);
0777 
0778 % Set folds and call fold function to change plot/stats
0779 handles.folds = folds;
0780 set(handles.foldmenu,'String',handles.folds);
0781 handles.model_button = 1;
0782 
0783 foldmenu_Callback(hObject, eventdata, handles);
0784 
0785 % Update stats if they are being shown
0786 if isfield(handles, 'stats')
0787     statsbutton_Callback(hObject, eventdata, handles);
0788 end
0789 
0790 handles.model_button = 0;
0791 guidata(hObject, handles);
0792 
0793 
0794 % --- Executes during object creation, after setting all properties.
0795 function classmenu_CreateFcn(hObject, eventdata, handles)
0796 % hObject    handle to classmenu (see GCBO)
0797 % eventdata  reserved - to be defined in a future version of MATLAB
0798 % handles    empty - handles not created until after all CreateFcns called
0799 
0800 % Hint: popupmenu controls usually have a white background on Windows.
0801 %       See ISPC and COMPUTER.
0802 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0803     set(hObject,'BackgroundColor','white');
0804 end
0805 
0806 
0807 function repedit_Callback(hObject, eventdata, handles)
0808 % hObject    handle to repedit (see GCBO)
0809 % eventdata  reserved - to be defined in a future version of MATLAB
0810 % handles    structure with handles and user data (see GUIDATA)
0811 
0812 % Hints: get(hObject,'String') returns contents of repedit as text
0813 %        str2double(get(hObject,'String')) returns contents of repedit as a double
0814 
0815 
0816 % --- Executes during object creation, after setting all properties.
0817 function repedit_CreateFcn(hObject, eventdata, handles)
0818 % hObject    handle to repedit (see GCBO)
0819 % eventdata  reserved - to be defined in a future version of MATLAB
0820 % handles    empty - handles not created until after all CreateFcns called
0821 
0822 % Hint: edit controls usually have a white background on Windows.
0823 %       See ISPC and COMPUTER.
0824 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0825     set(hObject,'BackgroundColor','white');
0826 end
0827 
0828 
0829 % --- Executes on button press in permutbutton.
0830 function permutbutton_Callback(hObject, eventdata, handles)
0831 % hObject    handle to permutbutton (see GCBO)
0832 % eventdata  reserved - to be defined in a future version of MATLAB
0833 % handles    structure with handles and user data (see GUIDATA)
0834 
0835 m    = get(handles.classmenu,'Value');
0836 mi   = handles.mi;
0837 reps = str2num(get(handles.repedit,'String'));
0838 if  ~isempty(reps)
0839     if length(reps) ==1
0840         reps = round(reps);
0841         disp('Performing permutation test.........>>')
0842         prt_permutation(handles.PRT, reps, mi(m), handles.pathdir,...
0843             handles.save_weights);
0844         % Load new PRT.mat
0845         PRTmat = fullfile(handles.pathdir,'PRT.mat');
0846         load(PRTmat);
0847         perm     = PRT.model(mi(m)).output.stats.permutation;
0848         stats.perm      = perm;
0849         stats.show_perm = 1;
0850         if strcmp(handles.PRT.model(mi(m)).input.type,'classification');
0851             stats.type = 'class';
0852         else
0853             stats.type = 'reg';
0854         end
0855         handles.stats = stats;
0856         handles.PRT   = PRT;
0857         
0858         % Update GUI
0859         guidata(hObject, handles);
0860         
0861         % Call stats button
0862         statsbutton_Callback(hObject, eventdata, handles);
0863     else
0864         beep;
0865         disp('Please enter only one value for the number of repetitions!');
0866     end
0867 else
0868     beep;
0869     disp('Repetitions should be a number!');
0870 end
0871 
0872 % --- Executes on button press in save_perm_weights.
0873 function save_perm_weights_Callback(hObject, eventdata, handles)
0874 % hObject    handle to save_perm_weights (see GCBO)
0875 % eventdata  reserved - to be defined in a future version of MATLAB
0876 % handles    structure with handles and user data (see GUIDATA)
0877 
0878 % Hint: get(hObject,'Value') returns toggle state of save_perm_weights
0879 % Save the weights and predictions for each permutation if required
0880 flag=get(handles.save_perm_weights,'Value');
0881 if flag
0882     handles.save_weights=1;
0883 else
0884     handles.save_weights=0;
0885 end
0886 guidata(hObject, handles);
0887 
0888 
0889 % --- Executes on button press in statsbutton.
0890 function statsbutton_Callback(hObject, eventdata, handles)
0891 % hObject    handle to statsbutton (see GCBO)
0892 % eventdata  reserved - to be defined in a future version of MATLAB
0893 % handles    structure with handles and user data (see GUIDATA)
0894 
0895 % Reads model and fold
0896 % -------------------------------------------------------------------------
0897 fold  = get(handles.foldmenu,'Value');
0898 mi    = handles.mi;
0899 m     = get(handles.classmenu,'Value');
0900 PRT   = handles.PRT;
0901 
0902 % Check if stats exist
0903 % -------------------------------------------------------------------------
0904 if isfield(handles, 'stats')
0905     stats = handles.stats;
0906 end
0907 
0908 % Read stats
0909 % -------------------------------------------------------------------------
0910 if strcmp(PRT.model(mi(m)).input.type,'classification')
0911     if fold == 1
0912         macc  = PRT.model(mi(m)).output.stats.acc;  % overall acc
0913         mbacc = PRT.model(mi(m)).output.stats.b_acc;
0914         mcacc = PRT.model(mi(m)).output.stats.c_acc;
0915         mcpv  = PRT.model(mi(m)).output.stats.c_pv;
0916         if isfield(PRT.model(mi(m)).output.stats,'permutation') && ...
0917                 ~isempty(PRT.model(mi(m)).output.stats.permutation)
0918             stats.show_perm=1;
0919             stats.perm.pvalue_b_acc=PRT.model(mi(m)).output.stats.permutation.pvalue_b_acc;
0920             stats.perm.pvalue_c_acc=PRT.model(mi(m)).output.stats.permutation.pvalue_c_acc;
0921         end
0922     else
0923         macc  = PRT.model(mi(m)).output.fold(fold-1).stats.acc;
0924         mbacc = PRT.model(mi(m)).output.fold(fold-1).stats.b_acc;
0925         mcacc = PRT.model(mi(m)).output.fold(fold-1).stats.c_acc;
0926         mcpv  = PRT.model(mi(m)).output.fold(fold-1).stats.c_pv;
0927     end
0928     
0929     stats.macc  = macc;
0930     stats.mbacc = mbacc;
0931     stats.mcacc = mcacc;
0932     stats.mcpv  = mcpv;
0933     stats.type  = 'class';
0934     
0935     prt_ui_stats(stats,handles.prtdir);
0936     
0937 else
0938     if fold == 1
0939         corr  = PRT.model(mi(m)).output.stats.corr;  % overall correlation
0940         if isfield(PRT.model(mi(m)).output.stats,'r2')
0941             r2  = PRT.model(mi(m)).output.stats.r2;  % squared correlation
0942         end
0943         mse   = PRT.model(mi(m)).output.stats.mse;  % overall mse
0944         if isfield(PRT.model(mi(m)).output.stats,'nmse')
0945             nmse  = PRT.model(mi(m)).output.stats.nmse;  % normalised mse
0946         end
0947         if isfield(PRT.model(mi(m)).output.stats,'permutation') && ...
0948                 ~isempty(PRT.model(mi(m)).output.stats.permutation)
0949             stats.show_perm=1;
0950             stats.perm.pval_corr = PRT.model(mi(m)).output.stats.permutation.pval_corr;
0951             stats.perm.pval_mse = PRT.model(mi(m)).output.stats.permutation.pval_mse;
0952             
0953             if isfield(PRT.model(mi(m)).output.stats.permutation, 'pval_r2'),...
0954                     stats.perm.pval_r2 = PRT.model(mi(m)).output.stats.permutation.pval_r2; end
0955             if isfield(PRT.model(mi(m)).output.stats.permutation, 'pval_nmse'),...
0956                     stats.perm.pval_nmse = PRT.model(mi(m)).output.stats.permutation.pval_nmse; end
0957             
0958         end
0959     else
0960         corr  = PRT.model(mi(m)).output.fold(fold-1).stats.corr;  % overall correlation
0961         if isfield(PRT.model(mi(m)).output.stats,'r2')
0962             r2  = PRT.model(mi(m)).output.fold(fold-1).stats.r2;  % overall correlation
0963         end
0964         mse   = PRT.model(mi(m)).output.fold(fold-1).stats.mse;  % overall mse
0965         if isfield(PRT.model(mi(m)).output.stats,'nmse')
0966             nmse  = PRT.model(mi(m)).output.fold(fold-1).stats.nmse;  % normalised mse
0967         end
0968     end
0969     
0970     stats.corr = corr;
0971     if isfield(PRT.model(mi(m)).output.stats,'r2'), stats.r2 = r2; end
0972     stats.mse  = mse;
0973     if isfield(PRT.model(mi(m)).output.stats,'nmse'), stats.nmse = nmse; end
0974     stats.type = 'reg';
0975     
0976     prt_ui_stats(stats,handles.prtdir);
0977     
0978 end
0979 
0980 stats.show_perm = 0;
0981 handles.stats = stats;
0982 guidata(hObject, handles);
0983 
0984 % Show crosshairs position
0985 % -------------------------------------------------------------------------
0986 function showpos()
0987 
0988 global st
0989 
0990 mp13 = st.handles.mmedit;
0991 mp14 = st.handles.vxedit;
0992 tx20 = st.handles.posintensitytext;
0993 
0994 set(mp13,'String',sprintf('%.1f %.1f %.1f',spm_orthviews('Pos')));
0995 pos = spm_orthviews('Pos',1);
0996 set(mp14,'String',sprintf('%.1f %.1f %.1f',pos));
0997 set(tx20,'String',sprintf('%g',spm_sample_vol(st.V,pos(1),pos(2),pos(3),st.hld)));
0998 
0999 cmap = get(gcf,'Colormap');
1000 if size(cmap,1)~=128
1001     spm_figure('Colormap','gray-jet');
1002 end
1003 
1004 
1005 % --- Executes on button press in resetbutton.
1006 function resetbutton_Callback(hObject, eventdata, handles)
1007 % hObject    handle to resetbutton (see GCBO)
1008 % eventdata  reserved - to be defined in a future version of MATLAB
1009 % handles    structure with handles and user data (see GUIDATA)
1010 spm_orthviews('Reset');
1011 if isfield(handles, 'wmap'), handles = rmfield(handles, 'wmap'); end
1012 if isfield(handles, 'aimg'), handles = rmfield(handles,'aimg'); end
1013 handles.noloadw = 0;
1014 guidata(hObject, handles);
1015 
1016 % Save menu
1017 % -------------------------------------------------------------------------
1018 function savemenu_Callback(hObject, eventdata, handles)
1019 % hObject    handle to savemenu (see GCBO)
1020 % eventdata  reserved - to be defined in a future version of MATLAB
1021 % handles    structure with handles and user data (see GUIDATA)
1022 wd=cd;
1023 cd(handles.prtdir)
1024 [filename, pathname] = uiputfile( ...
1025     {'*.png','Portable Network Graphics (*.png)';...
1026     '*.jpeg','JPEG figure (*.jpeg)';...
1027     '*.tiff','Compressed TIFF figure (*.tiff)';...
1028     '*.fig','Matlab figure (*.fig)';...
1029     '*.pdf','Color PDF file (*.pdf)';...
1030     '*.epsc',  'Encapsulated PostScript (*.eps)'},...
1031     'Save figure as','.png');
1032 [a,b,c]=fileparts(filename);
1033 ext=['-d',c(2:end)];
1034 
1035 % Set the color of the different backgrounds and figure parameters to white
1036 cf=get(handles.figure1,'Color');
1037 set(handles.figure1,'Color',[1,1,1])
1038 aa=get(handles.figure1,'children');
1039 xc=[];
1040 for i=1:length(aa)
1041     if strcmpi(get(aa(i),'type'),'uipanel')
1042         try
1043             xc=[xc;get(aa(i),'BackgroundColor')];
1044             set(aa(i),'BackgroundColor',[1 1 1])
1045         end
1046         bb=get(aa(i),'children');
1047         if ~isempty(bb)
1048             for j=1:length(bb)
1049                 try
1050                     xc=[xc;get(bb(j),'BackgroundColor')];
1051                     set(bb(j),'BackgroundColor',[1 1 1])
1052                 end
1053                 if strcmpi(get(bb(j),'type'),'uipanel')
1054                     cc=get(bb(j),'children');
1055                     if ~isempty(cc)
1056                         for k=1:length(cc)
1057                             try
1058                                 xc=[xc;get(cc(k),'BackgroundColor')];
1059                                 set(cc(k),'BackgroundColor',[1 1 1])
1060                             end
1061                             if strcmpi(get(cc(k),'type'),'uipanel')
1062                                 dd=get(cc(k),'children');
1063                                 if ~isempty(dd)
1064                                     for l=1:length(dd)
1065                                         try
1066                                             xc=[xc;get(dd(l),'BackgroundColor')];
1067                                             set(dd(l),'BackgroundColor',[1 1 1])
1068                                         end
1069                                     end
1070                                 end
1071                             end
1072                         end
1073                     end
1074                 end
1075             end
1076         end
1077     end
1078     if ~strcmpi(get(aa(i),'type'),'uimenu')
1079         try
1080             xc=[xc;get(aa(i),'BackgroundColor')];
1081             set(aa(i),'BackgroundColor',[1 1 1])
1082         end
1083     end
1084 end
1085 
1086 if ~strcmp(ext, '-dfig')
1087     print(handles.figure1,ext,[pathname,filesep,b],'-r500')
1088 else
1089     saveas(handles.figure1,[pathname,filesep,b],'fig')
1090 end
1091 
1092 
1093 % Set the color of the different backgrounds and figure parameters to white
1094 set(handles.figure1,'Color',cf)
1095 scount=1;
1096 for i=1:length(aa)
1097     if strcmpi(get(aa(i),'type'),'uipanel')
1098         try
1099             set(aa(i),'BackgroundColor',xc(scount,:))
1100             scount=scount+1;
1101         end
1102         bb=get(aa(i),'children');
1103         if ~isempty(bb)
1104             for j=1:length(bb)
1105                 try
1106                     set(bb(j),'BackgroundColor',xc(scount,:))
1107                     scount=scount+1;
1108                 end
1109                 if strcmpi(get(bb(j),'type'),'uipanel')
1110                     cc=get(bb(j),'children');
1111                     if ~isempty(cc)
1112                         for k=1:length(cc)
1113                             try
1114                                 set(cc(k),'BackgroundColor',xc(scount,:))
1115                                 scount=scount+1;
1116                             end
1117                             if strcmpi(get(cc(k),'type'),'uipanel')
1118                                 dd=get(cc(k),'children');
1119                                 if ~isempty(dd)
1120                                     for l=1:length(dd)
1121                                         try
1122                                             set(dd(l),'BackgroundColor',xc(scount,:))
1123                                             scount=scount+1;
1124                                         end
1125                                     end
1126                                 end
1127                             end
1128                         end
1129                     end
1130                 end
1131             end
1132         end
1133     elseif ~strcmpi(get(aa(i),'type'),'uimenu')
1134         try
1135             set(aa(i),'BackgroundColor',xc(scount,:))
1136             scount=scount+1;
1137         end
1138     end
1139 end
1140 
1141 cd(wd)

Generated on Tue 10-Feb-2015 18:16:33 by m2html © 2005