0001 function varargout = Menu_PCA(varargin)
0002
0003
0004
0005 gui_Singleton = 1;
0006 gui_State = struct('gui_Name', mfilename, ...
0007 'gui_Singleton', gui_Singleton, ...
0008 'gui_OpeningFcn', @Menu_PCA_OpeningFcn, ...
0009 'gui_OutputFcn', @Menu_PCA_OutputFcn, ...
0010 'gui_LayoutFcn', [] , ...
0011 'gui_Callback', []);
0012 if nargin && ischar(varargin{1})
0013 gui_State.gui_Callback = str2func(varargin{1});
0014 end
0015
0016 if nargout
0017 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0018 else
0019 gui_mainfcn(gui_State, varargin{:});
0020 end
0021
0022 function Menu_PCA_OpeningFcn(hObject, eventdata, handles, varargin)
0023
0024
0025
0026
0027
0028 handles.output = hObject;
0029 handles=menu(handles);
0030
0031
0032
0033 x=evalin('base','whos();');
0034 list=[];
0035 for i=1:length(x)
0036 if strcmp(x(i).class,'PCA') ~=0
0037 list=[list; {x(i).name}];
0038 end
0039 end
0040 if isempty(list)
0041 list={'No PCA object in workspace'};
0042 end
0043
0044 set(handles.popupmenu49,'String',list);
0045
0046
0047 popupmenu49_Callback(hObject, eventdata, handles);
0048
0049
0050 set(handles.edit1,'Visible','off');
0051 info={
0052 'Select batches to see their contributions ->'
0053 };
0054 set(handles.texthelp,'String',info);
0055
0056
0057 set(handles.listbox1,'Max',999999);
0058
0059 guidata(hObject, handles);
0060
0061 function pushbutton25_Callback(~, ~, ~)
0062
0063 Menu_Projecta_Dades_PCA();
0064
0065 function pushbutton26_Callback(~, ~, ~)
0066
0067 Menu_Crea_Model_PCA();
0068
0069 function popupmenu49_Callback(hObject, eventdata, handles)
0070
0071
0072
0073 nom=get(handles.popupmenu49,'string');
0074 nom=nom{get(handles.popupmenu49,'value')};
0075
0076 if strcmp(nom,'No PCA object in workspace')
0077
0078
0079
0080 set(handles.popupmenu50,'Enable','off');
0081 set(handles.popupmenu51,'Enable','off');
0082 set(handles.popupmenu52,'Enable','off');
0083 set(handles.popupmenu53,'Enable','off');
0084 set(handles.popupmenu54,'Enable','off');
0085 set(handles.popupmenu55,'Enable','off');
0086 set(handles.popupmenu56,'Enable','off');
0087 set(handles.pushbutton29,'Enable','off');
0088 set(handles.pushbutton28,'Enable','off');
0089 set(handles.listbox1,'Enable','off');
0090 set(handles.uitable1,'Enable','off');
0091 set(handles.edit19,'Enable','off');
0092 set(handles.edit20,'Enable','off');
0093 set(handles.edit21,'Enable','off');
0094 else
0095
0096
0097
0098
0099
0100 inst = [nom '.isModel()'];
0101 if(evalin('base',inst))
0102
0103
0104
0105 set(handles.popupmenu50,'Enable','on');
0106 set(handles.popupmenu51,'Enable','on');
0107 set(handles.popupmenu52,'Enable','on');
0108 set(handles.popupmenu53,'Enable','on');
0109 set(handles.popupmenu54,'Enable','on');
0110 set(handles.popupmenu55,'Enable','on');
0111 set(handles.popupmenu56,'Enable','on');
0112 if evalin('base',[nom '.getUnfoldingMethod();'])+1 == 1
0113 set(handles.pushbutton29,'Enable','on');
0114 else
0115 set(handles.pushbutton29,'Enable','off');
0116 end
0117 set(handles.pushbutton28,'Enable','on');
0118 set(handles.listbox1,'Enable','on');
0119 set(handles.uitable1,'Enable','on');
0120 set(handles.edit19,'Enable','on');
0121 set(handles.edit20,'Enable','on');
0122 set(handles.edit21,'Enable','on');
0123
0124 else
0125
0126 set(handles.popupmenu50,'Enable','off');
0127 set(handles.popupmenu51,'Enable','off');
0128 set(handles.popupmenu52,'Enable','off');
0129 set(handles.popupmenu53,'Enable','off');
0130 set(handles.popupmenu54,'Enable','off');
0131 set(handles.popupmenu55,'Enable','off');
0132 set(handles.popupmenu56,'Enable','on');
0133 set(handles.pushbutton29,'Enable','off');
0134 set(handles.pushbutton28,'Enable','on');
0135 set(handles.listbox1,'Enable','on');
0136 set(handles.uitable1,'Enable','on');
0137 set(handles.edit19,'Enable','on');
0138 set(handles.edit20,'Enable','on');
0139 set(handles.edit21,'Enable','on');
0140
0141 end
0142
0143
0144 set(handles.popupmenu50,'Value',evalin('base',[nom '.getNormalizationMethod();']));
0145 set(handles.popupmenu51,'Value',evalin('base',[nom '.getPCSelectionMethod();'])+1);
0146 set(handles.popupmenu52,'Value',evalin('base',[nom '.getTrajectoryRemoval();'])+1);
0147 set(handles.popupmenu53,'Value',evalin('base',[nom '.getUnfoldingMethod();'])+1);
0148 set(handles.popupmenu54,'Value',evalin('base',[nom '.getLimitMethod();'])+1);
0149 set(handles.popupmenu55,'Value',evalin('base',[nom '.getContMetode();'])+1);
0150
0151
0152
0153
0154
0155 dade2 = evalin('base',[nom '.getDATA();']);
0156 aux=dade2.getBatchLabel();
0157
0158
0159 if(isempty(aux) && (evalin('base',[nom '.getBatchCount()']) > 0))
0160 evalin('base',[nom '.setBatchLabel(num2cell(1:' nom '.getBatchCount))']);
0161 warndlg('Selected object had no batch names. Automatic ones ware assigned.','Attention!')
0162 end
0163
0164 set(handles.listbox1,'Value',1);
0165 set(handles.listbox1,'ListboxTop', 1);
0166 set(handles.listbox1,'String',aux);
0167
0168
0169 listbox1_Callback(hObject, eventdata, handles)
0170
0171
0172
0173 aux = evalin('base',[nom '.getLambdaAll();']);
0174 taula=num2cell(aux);
0175 landi = evalin('base',[nom '.getLambdaAll();']);
0176 aux = sum(landi);
0177
0178 aux2=landi / aux * 100;
0179 taula= [taula num2cell(aux2)];
0180
0181 taula= [taula num2cell(cumsum(aux2)) ];
0182
0183 taula{ evalin('base',[nom '.getNum();']) ,4} = ' * Num *';
0184 index = find(landi==0,1,'first')-1;
0185 if ~isempty(index)
0186 taula=taula(1:(index),:);
0187 end
0188 set(handles.uitable1,'Data',taula);
0189
0190 updateinfo( handles,nom);
0191
0192 end
0193
0194 function updateinfo(handles,nom)
0195
0196 set(handles.text77,'String',evalin('base',[nom '.getSampleCount();']));
0197 set(handles.text78,'String',evalin('base',[nom '.getVariableCount();']));
0198 set(handles.text79,'String',evalin('base',[nom '.getBatchCount();']));
0199 set(handles.text80,'String',evalin('base',[nom '.getNum();']));
0200 set(handles.text81,'String',evalin('base',[nom '.getT2Limit();']));
0201 set(handles.text82,'String',evalin('base',[nom '.getQLimit();']));
0202
0203
0204 clases=evalin('base',[nom '.getClass();']);
0205 uni = max(unique(clases));
0206 uni = 1:uni;
0207 for i = uni
0208 su(i) = sum(clases == i);
0209 end
0210
0211 ind = (su ~=0);
0212 set(handles.axes1,'visible','on');
0213 pie(handles.axes1,su(ind) ,uni(ind));
0214 legend(handles.axes1,char2cell(num2str(uni(ind))),'Location','BestOutside');
0215
0216
0217 function listbox1_Callback(~, ~, handles)
0218
0219
0220 num=get(handles.listbox1,'value');
0221
0222 if size(num,1) ~= 1 || size(num,2) ~= 1
0223 set(handles.edit19,'String','-');
0224 set(handles.edit20,'String','-');
0225 set(handles.edit21,'String','-');
0226 else
0227
0228
0229
0230 nom=get(handles.popupmenu49,'String');
0231 nom=nom{get(handles.popupmenu49,'Value')};
0232
0233
0234
0235 Q=evalin('base',[nom '.getQ();']);
0236 T2=evalin('base',[nom '.getT2();']);
0237 class=evalin('base',[nom '.getClass();']);
0238
0239
0240 if ~isempty(class)
0241 set(handles.edit19,'String',num2str(class(num)));
0242 else
0243 set(handles.edit19,'String','Empty');
0244 end
0245
0246
0247 set(handles.edit20,'String',num2str(Q(num)'));
0248 set(handles.edit21,'String',num2str(T2(num)'));
0249 end
0250
0251
0252 function Delete_Callback(hObject, eventdata, handles)
0253
0254 dade=get(handles.popupmenu49,'String');
0255 dade1=dade{get(handles.popupmenu49,'Value')};
0256
0257
0258
0259 lot1=num2str(get(handles.listbox1,'Value'));
0260
0261
0262 if isempty(get(handles.listbox1,'String'))
0263 errordlg('Select one object!','Error');
0264 else
0265
0266 inst=[ dade1 '.deleteBatch([' num2str(lot1) ']);'];
0267 evalin('base',inst);
0268
0269
0270 aux=evalin('base',[dade1 '.getBatchLabel()']);
0271 set(handles.listbox1,'Value',length(aux));
0272 set(handles.listbox1,'String', aux);
0273
0274 popupmenu49_Callback(hObject, eventdata, handles);
0275 end
0276 function PlotVars_Callback(~, ~, handles)
0277
0278 if isempty(get(handles.listbox1,'String'))
0279 errordlg('Select one object!','Error');
0280 else
0281
0282
0283 dade=get(handles.popupmenu49,'String');
0284 dade1=dade{get(handles.popupmenu49,'Value')};
0285
0286
0287
0288 lot=get(handles.listbox1,'Value');
0289 inst=[ dade1 '.getBatch([' num2str(lot) ']);'];
0290 [dades , ~, nom] = evalin('base',inst);
0291
0292
0293 m=floor(size(dades,2)/2);
0294 n=floor( (size(dades,2)+1)/2 );
0295
0296 figure;
0297
0298 objecte = evalin('base',[dade1 '.getDATA()']);
0299 tit = objecte.getVariableLabel();
0300 if isempty(tit)
0301 tit = 1:size(dades,2);
0302 end
0303
0304 color_table = jet(size(dades,3));
0305 hold on;
0306 if(m == 0)
0307 m=1;
0308 end
0309 for i = 1:size(dades,2)
0310 subplot(m,n,i)
0311 if i == 1
0312 ti = {};
0313 hold on;
0314 for j= 1:size(dades,3)
0315 plot(1:size(dades,1),dades(:,i,j),'color',color_table(j,:))
0316 ti = {ti{:} ['Batch:' num2str(nom{j}) ' -- Object:' dade1]};
0317 end
0318 hold off;
0319 else
0320
0321 hold on;
0322 for j= 1:size(dades,3)
0323 plot(1:size(dades,1),dades(:,i,j),'color',color_table(j,:))
0324 end
0325 hold off;
0326 end
0327 title(tit(i))
0328 legend(ti)
0329 legend('off')
0330 end
0331 hold off;
0332 end
0333 function CanviaClasse_Callback(~, ~, handles)
0334 if isempty(get(handles.listbox1,'String'))
0335 errordlg('Select one object!','Error');
0336 else
0337
0338 dade=get(handles.popupmenu49,'String');
0339 dade2=dade{get(handles.popupmenu49,'Value')};
0340
0341
0342 class = evalin('base',[dade2 '.getClass()']);
0343 index = get(handles.listbox1,'Value');
0344
0345 answer = inputdlg('Wich class should have?');
0346 answer = str2double(answer);
0347
0348 while isnan(answer)
0349 errordlg('Classes must be Integer!','Error')
0350
0351 uiwait(gcf);
0352 answer = inputdlg('Wich class should have?');
0353 answer = str2double(answer);
0354 end
0355
0356 if ~isempty(answer)
0357 class(index) = answer;
0358 evalin('base',[dade2 '.setClass([' num2str(class) ']);']);
0359 set(handles.edit19,'String',num2str(answer));
0360 updateinfo( handles,dade2);
0361 end
0362 end
0363 function CanviaNom_Callback(~, ~, handles)
0364 if isempty(get(handles.listbox1,'String'))
0365 errordlg('select one object!','Error');
0366 else
0367
0368 dade=get(handles.popupmenu49,'String');
0369 dade2=dade{get(handles.popupmenu49,'Value')};
0370
0371
0372 class = evalin('base',[dade2 '.getBatchLabel()']);
0373 index = get(handles.listbox1,'Value');
0374
0375 answer = inputdlg('Which name should have?');
0376
0377 if ~isempty(answer)
0378 class(index) = answer;
0379 aux = evalin('base',[dade2 '.copy();']);
0380 aux.setBatchLabel(class);
0381
0382 assignin('base',dade2, aux);
0383
0384 set(handles.listbox1,'value', 1)
0385 set(handles.listbox1,'String', class)
0386
0387 end
0388 end
0389
0390
0391 function List1_Callback(~, ~, handles)
0392
0393
0394 if length(get(handles.listbox1,'Value')) <= 1
0395 R=java.awt.Robot;
0396 R.setAutoWaitForIdle(1);
0397 R.mousePress(java.awt.event.InputEvent.BUTTON1_MASK);
0398 R.mouseRelease(java.awt.event.InputEvent.BUTTON1_MASK);
0399 end
0400
0401
0402 function pushbutton28_Callback(~, ~, handles)
0403
0404
0405 nom=get(handles.popupmenu49,'String');
0406 nom=nom{get(handles.popupmenu49,'Value')};
0407
0408
0409 switch get(handles.popupmenu56,'Value')
0410 case 1
0411 figure();
0412
0413 aux=get(handles.listbox1,'Value');
0414 inst=[nom '.plotQContribution([' num2str(aux) ']);'];
0415 case 2
0416 figure();
0417
0418 aux=get(handles.listbox1,'Value');
0419 inst=[nom '.plotT2Contribution([' num2str(aux) ']);'];
0420 case 3
0421 figure();
0422 inst=[nom '.plotT2Q();'];
0423 case 4
0424 figure();
0425 inst=[nom '.plotScores(' get(handles.edit1,'String') ');'];
0426 case 5
0427 figure();
0428 inst=[nom '.plotVarianceCaptured();'];
0429 case 6
0430 figure();
0431 inst=[nom '.plotQSignatures();'];
0432 case 7
0433 figure();
0434 inst=[nom '.plotT2Signatures();'];
0435 case 8
0436 figure();
0437 inst=[nom '.plotScreePlot();'];
0438 case 9
0439 figure();
0440 inst=[nom '.plotMean();'];
0441 case 10
0442 figure();
0443 inst=[nom '.plotStd();'];
0444 case 11
0445 figure();
0446 inst=[nom '.plotP(' get(handles.edit1,'String') ');'];
0447 case 12
0448 figure();
0449 inst=[nom '.plotLoadings(' get(handles.edit1,'String') ');'];
0450 case 13
0451 PlotVars_Callback(-1,-1,handles);
0452 case 14
0453 inst=[nom '.plotOutLiers();'];
0454 end
0455 if exist('inst','var')
0456 try
0457 evalin('base',inst);
0458 catch err
0459 errordlg(err.message,'Error');
0460 end
0461 end
0462
0463 function popupmenu56_Callback(hObject, ~, handles)
0464 switch get(hObject,'value')
0465
0466 case 1
0467 set(handles.edit1,'Visible','off');
0468 info={
0469 'Select batches to see their contributions ->'
0470 };
0471
0472 set(handles.texthelp,'String',info);
0473
0474
0475
0476 case 2
0477 set(handles.edit1,'Visible','off');
0478 info={
0479 'Select batches to see their contributions ->'
0480 };
0481
0482 set(handles.texthelp,'String',info);
0483
0484
0485
0486 case 3
0487 set(handles.edit1,'Visible','off');
0488 info={
0489 ''
0490 };
0491
0492 set(handles.texthelp,'String',info);
0493
0494
0495
0496 case 4
0497 set(handles.edit1,'Visible','on');
0498 info={
0499 '^'
0500 'Insert the number of score you want to see'
0501 'Correct formats are:'
0502 'double -> T(x) vs time'
0503 'double,double -> T(x) vs T(y)'
0504 'double,double,double -> T(x) vs T(y) vs T(z)'
0505 };
0506
0507 set(handles.texthelp,'String',info);
0508
0509
0510
0511 case 5
0512 set(handles.edit1,'Visible','off');
0513 info={
0514 ''
0515 };
0516
0517 set(handles.texthelp,'String',info);
0518
0519
0520
0521 case 6
0522 set(handles.edit1,'Visible','off');
0523 info={
0524 ''
0525 };
0526
0527 set(handles.texthelp,'String',info);
0528
0529
0530
0531 case 7
0532 set(handles.edit1,'Visible','off');
0533 info={
0534 ''
0535 };
0536
0537 set(handles.texthelp,'String',info);
0538
0539
0540
0541 case 8
0542 set(handles.edit1,'Visible','off');
0543 info={
0544 ''
0545 };
0546
0547 set(handles.texthelp,'String',info);
0548
0549
0550
0551 case 9
0552 set(handles.edit1,'Visible','off');
0553 info={
0554 ''
0555 };
0556
0557 set(handles.texthelp,'String',info);
0558
0559
0560
0561 case 10
0562 set(handles.edit1,'Visible','off');
0563 info={
0564 ''
0565 };
0566
0567 set(handles.texthelp,'String',info);
0568
0569
0570
0571 case 11
0572 set(handles.edit1,'Visible','on');
0573 info={
0574 '^'
0575 'You must introduce the Index of the P you want to see.'
0576 'Correct formats are:'
0577 'double'
0578 '[double]'
0579 'Matlab Expressions'
0580 };
0581
0582 set(handles.texthelp,'String',info);
0583
0584
0585
0586 case 12
0587 set(handles.edit1,'Visible','on');
0588 info={
0589 '^'
0590 'Insert the number of Principal Component you want to see'
0591 'Correct formats are:'
0592 'double -> PC(x) vs time'
0593 'double,double -> PC(x) vs PC(y)'
0594 'double,double,double -> PC(x) vs PC(y) vs PC(z)'
0595 };
0596
0597 set(handles.texthelp,'String',info);
0598
0599
0600
0601 case 13
0602 set(handles.edit1,'Visible','off');
0603 info={
0604 'Select batches to see their variables ->'
0605 };
0606
0607 set(handles.texthelp,'String',info);
0608 case 14
0609 set(handles.edit1,'Visible','off');
0610 info={
0611 ''
0612 };
0613
0614 set(handles.texthelp,'String',info);
0615 otherwise
0616 errordlg('Unsuported Plot method!','Error')
0617 end
0618
0619
0620 function popupmenu50_Callback(hObject, eventdata, handles)
0621 try
0622 nom=get(handles.popupmenu49,'String');
0623 nom=nom{get(handles.popupmenu49,'Value')};
0624
0625
0626 if evalin('base',[nom '.isModel();'])
0627
0628
0629 inst=[nom '.setNormalizationMethod(' num2str(get(handles.popupmenu50,'Value')) ');'];
0630 evalin('base',inst);
0631
0632 else
0633
0634
0635
0636 errordlg('Selected object is not a Model','Error')
0637
0638 uiwait(handle(gcf));
0639 end
0640
0641
0642 popupmenu49_Callback(hObject, eventdata, handles);
0643
0644 catch err
0645 errordlg(err.message,'Error');
0646 end
0647 function popupmenu51_Callback(hObject, eventdata, handles)
0648 try
0649 nom=get(handles.popupmenu49,'String');
0650 nom=nom{get(handles.popupmenu49,'Value')};
0651
0652
0653 if evalin('base',[nom '.isModel();'])
0654
0655
0656 inst=[nom '.setPCSelectionMethod(' num2str(get(handles.popupmenu51,'Value')-1) ');'];
0657 evalin('base',inst);
0658
0659
0660 else
0661
0662
0663
0664 errordlg('Selected object is not a Model','Error')
0665 uiwait(handle(gcf));
0666 end
0667
0668
0669 popupmenu49_Callback(hObject, eventdata, handles);
0670
0671 catch err
0672 errordlg(err.message,'Error');
0673 end
0674 function popupmenu52_Callback(hObject, eventdata, handles)
0675 try
0676 nom=get(handles.popupmenu49,'String');
0677 nom=nom{get(handles.popupmenu49,'Value')};
0678
0679
0680 if evalin('base',[nom '.isModel();'])
0681
0682
0683 inst=[nom '.setTrajectoryRemoval(' num2str(get(handles.popupmenu52,'Value')-1) ');'];
0684 evalin('base',inst);
0685
0686 else
0687
0688
0689
0690 errordlg('Selected object is not a Model','Error')
0691
0692 uiwait(handle(gcf));
0693 end
0694
0695
0696 popupmenu49_Callback(hObject, eventdata, handles);
0697
0698 catch err
0699 errordlg(err.message,'Error');
0700 end
0701 function popupmenu53_Callback(hObject, eventdata, handles)
0702 try
0703 nom=get(handles.popupmenu49,'String');
0704 nom=nom{get(handles.popupmenu49,'Value')};
0705
0706
0707 if evalin('base',[nom '.isModel();'])
0708
0709
0710 inst=[nom '.setUnfoldingMethod(' num2str(get(handles.popupmenu53,'Value')-1) ');'];
0711 evalin('base',inst);
0712
0713 else
0714
0715
0716
0717 errordlg('Selected object is not a Model','Error')
0718
0719 uiwait(handle(gcf));
0720 end
0721
0722
0723 popupmenu49_Callback(hObject, eventdata, handles);
0724
0725 catch err
0726 errordlg(err.message,'Error');
0727 end
0728 function popupmenu54_Callback(hObject, eventdata, handles)
0729 try
0730 nom=get(handles.popupmenu49,'String');
0731 nom=nom{get(handles.popupmenu49,'Value')};
0732
0733
0734 if evalin('base',[nom '.isModel();'])
0735
0736
0737
0738 inst=[nom '.setLimitMethod(' num2str(get(handles.popupmenu54,'Value')-1) ');'];
0739 evalin('base',inst);
0740
0741
0742 else
0743
0744
0745
0746 errordlg('Selected object is not a Model','Error')
0747
0748 uiwait(handle(gcf));
0749 end
0750
0751
0752 popupmenu49_Callback(hObject, eventdata, handles);
0753
0754 catch err
0755 errordlg(err.message,'Error');
0756 end
0757 function popupmenu55_Callback(hObject, eventdata, handles)
0758 try
0759 nom=get(handles.popupmenu49,'String');
0760 nom=nom{get(handles.popupmenu49,'Value')};
0761
0762
0763
0764
0765 inst=[nom '.setContributionMethod(' num2str(get(handles.popupmenu55,'Value')-1) ');'];
0766 evalin('base',inst);
0767
0768
0769 popupmenu49_Callback(hObject, eventdata, handles);
0770
0771 catch err
0772 errordlg(err.message,'Error');
0773 end
0774
0775
0776 function Update(hObject, eventdata, handles)
0777
0778 handles=menu(handles);
0779 guidata(hObject, handles);
0780
0781
0782 nom=get(handles.popupmenu49,'String');
0783 nom=nom{get(handles.popupmenu49,'Value')};
0784
0785
0786
0787 inst = ['exist(''' nom ''')'];
0788 if evalin('base', inst)
0789
0790 x=evalin('base','whos();');
0791 list=[];
0792 for i=1:length(x)
0793 if strcmp(x(i).class,'PCA') ~=0
0794 list=[list; {x(i).name}];
0795 end
0796 end
0797 if isempty(list)
0798 list={'No PCA object in workspace'};
0799 end
0800
0801 set(handles.popupmenu49,'String',list);
0802
0803
0804 set(handles.popupmenu49,'value',find(strcmp(list,nom),1,'first'));
0805
0806
0807 popupmenu49_Callback(hObject, eventdata, handles);
0808
0809
0810 else
0811
0812
0813
0814 x=evalin('base','whos();');
0815 list=[];
0816 for i=1:length(x)
0817 if strcmp(x(i).class,'PCA')
0818 list=[list; {x(i).name}];
0819 end
0820 end
0821 if isempty(list)
0822 list={'No PCA object in workspace'};
0823 end
0824
0825 set(handles.popupmenu49,'String',list);
0826
0827
0828 popupmenu49_Callback(hObject, eventdata, handles);
0829 end
0830
0831 function pushbutton29_Callback(hObject, eventdata, handles)
0832
0833 nom=get(handles.popupmenu49,'String');
0834 nom=nom{get(handles.popupmenu49,'Value')};
0835
0836
0837
0838 choice = questdlg('which outliers?','All','All','Extreme','Extreme');
0839 inst = [nom '.deleteOutLiers(''' choice ''');'];
0840
0841 a = 1;
0842 while(a > 0)
0843 a = evalin('base',inst);
0844 end
0845 popupmenu49_Callback(hObject, eventdata, handles);
0846
0847
0848
0849
0850
0851 function uitable1_ButtonDownFcn(hObject, eventdata, handles)
0852
0853 persistent chk
0854 set(hObject,'Interruptible','on');
0855 nom=get(handles.popupmenu49,'String');
0856 nom=nom{get(handles.popupmenu49,'Value')};
0857
0858
0859
0860 if strcmp(get(handles.uitable1,'enable'),'on') && evalin('base',[nom '.isModel()'])
0861 if isempty(chk)
0862 chk = 1;
0863 pause(0.5);
0864 if chk == 1
0865
0866 chk = [];
0867 end
0868 else
0869
0870 chk = [];
0871
0872 if length(get(handles.listbox1,'Value')) <= 1
0873 R=java.awt.Robot;
0874 R.setAutoWaitForIdle(1);
0875 R.mousePress(java.awt.event.InputEvent.BUTTON1_MASK);
0876 R.mouseRelease(java.awt.event.InputEvent.BUTTON1_MASK);
0877 end
0878 pause(0.001);
0879 myhandles = guidata(gcbo);
0880
0881 evalin('base',[nom '.setNum(' num2str(myhandles.selected(1)) ');']);
0882 popupmenu49_Callback(hObject, eventdata, handles)
0883 end
0884 end
0885
0886 function uitable1_CellSelectionCallback(hObject, eventdata, handles)
0887
0888 if(~exist('handles.selected','var'))
0889 handles.selected = [];
0890 end
0891 handles.selected=eventdata.Indices;
0892 guidata(hObject, handles);
0893
0894
0895 function edit1_Callback(~, ~, ~)
0896 function edit19_Callback(~, ~, ~)
0897 function edit20_Callback(~, ~, ~)
0898 function edit21_Callback(~, ~, ~)
0899 function edit19_CreateFcn(hObject, ~, ~)
0900 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0901 set(hObject,'BackgroundColor','white');
0902 end
0903 function edit20_CreateFcn(hObject, ~, ~)
0904 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0905 set(hObject,'BackgroundColor','white');
0906 end
0907 function edit21_CreateFcn(hObject, ~, ~)
0908 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0909 set(hObject,'BackgroundColor','white');
0910 end
0911 function listbox1_CreateFcn(hObject, ~, ~)
0912 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0913 set(hObject,'BackgroundColor','white');
0914 end
0915 function popupmenu49_CreateFcn(hObject, ~, ~)
0916 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0917 set(hObject,'BackgroundColor','white');
0918 end
0919 function popupmenu50_CreateFcn(hObject, ~, ~)
0920 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0921 set(hObject,'BackgroundColor','white');
0922 end
0923 function popupmenu51_CreateFcn(hObject, ~, ~)
0924 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0925 set(hObject,'BackgroundColor','white');
0926 end
0927 function popupmenu52_CreateFcn(hObject, ~, ~)
0928 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0929 set(hObject,'BackgroundColor','white');
0930 end
0931 function popupmenu53_CreateFcn(hObject, ~, ~)
0932 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0933 set(hObject,'BackgroundColor','white');
0934 end
0935 function popupmenu54_CreateFcn(hObject, ~, ~)
0936 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0937 set(hObject,'BackgroundColor','white');
0938 end
0939 function popupmenu55_CreateFcn(hObject, ~, ~)
0940 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0941 set(hObject,'BackgroundColor','white');
0942 end
0943 function popupmenu56_CreateFcn(hObject, ~, ~)
0944 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0945 set(hObject,'BackgroundColor','white');
0946 end
0947 function varargout = Menu_PCA_OutputFcn(~, ~, handles)
0948 varargout{1} = handles.output;
0949 function edit1_CreateFcn(hObject, ~, ~)
0950 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0951 set(hObject,'BackgroundColor','white');
0952 end