0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 function varargout = get_field(varargin)
0023
0024
0025
0026
0027 gui_Singleton = 0;
0028 gui_State = struct('gui_Name', mfilename, ...
0029 'gui_Singleton', gui_Singleton, ...
0030 'gui_OpeningFcn', @get_field_OpeningFcn, ...
0031 'gui_OutputFcn', @get_field_OutputFcn, ...
0032 'gui_LayoutFcn', [] , ...
0033 'gui_Callback', []);
0034 if nargin & isstr(varargin{1})
0035 gui_State.gui_Callback = str2func(varargin{1});
0036 end
0037
0038 if nargout
0039 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0040 else
0041 gui_mainfcn(gui_State, varargin{:});
0042 end
0043
0044
0045
0046
0047 function get_field_OpeningFcn(hObject, eventdata, handles,filename,Field,haxes)
0048
0049 set(handles.dimensions,'enable','on')
0050 browse_fig(handles.list_fig)
0051
0052
0053 handles.output = hObject;
0054
0055
0056 guidata(hObject, handles);
0057 pathuvmat=fileparts(which('uvmat'));
0058 addpath(fullfile(pathuvmat,'FIELD_FCT'))
0059 set(handles.attributes,'enable','on')
0060 set(hObject,'WindowButtonUpFcn',{@mouse_up_gui,handles})
0061 if exist('filename','var')& ischar(filename)
0062 set(handles.inputfile,'String',filename)
0063 inputfile_Callback(hObject, eventdata, handles)
0064 else
0065 set(handles.inputfile,'String','')
0066
0067 menu_str={'PLOT'};
0068
0069 path_get_field=which('get_field');
0070 for ilist=1:length(menu_str)
0071 fct_path{ilist,1}=path_get_field;
0072 end
0073 dir_perso=prefdir;
0074 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
0075 if exist(profil_perso,'file')
0076
0077 h=load (profil_perso);
0078 if isfield(h,'get_field_fct') && iscell(h.get_field_fct)
0079 for ilist=1:length(h.get_field_fct)
0080 [path,file]=fileparts(h.get_field_fct{ilist});
0081 fct_path=[fct_path; {path}];
0082 menu_str=[menu_str; {file}];
0083 end
0084
0085 end
0086 end
0087 menu_str=[menu_str;{'more...'}];
0088 set(handles.ACTION,'String',menu_str)
0089 set(handles.ACTION,'UserData',fct_path)
0090
0091 ACTION_Callback(hObject, eventdata, handles)
0092 end
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106 if exist('Field','var') & isstruct(Field)
0107 Field_input(eventdata,handles,Field)
0108 if exist('haxes','var')
0109 Field.PlotAxes=haxes;
0110 end
0111 set(hObject,'UserData',Field);
0112 end
0113
0114
0115
0116
0117
0118
0119
0120
0121 function varargout = get_field_OutputFcn(hObject, eventdata, handles)
0122 varargout{1} = handles.output;
0123
0124
0125
0126 function browse_Callback(hObject, eventdata, handles)
0127
0128
0129
0130
0131
0132 function inputfile_Callback(hObject, eventdata, handles)
0133 inputfile=get(handles.inputfile,'String');
0134 Field=nc2struct(inputfile,[]);
0135 hfig=get(handles.inputfile,'parent');
0136 set(hfig,'UserData',Field);
0137 Field_input(eventdata,handles,Field);
0138
0139
0140
0141 function Field_input(eventdata,handles,Field)
0142
0143 if isfield(Field,'ListDimName')
0144 Tabcell(:,1)=Field.ListDimName;
0145 for iline=1:length(Field.ListDimName)
0146 Tabcell{iline,2}=num2str(Field.DimValue(iline));
0147 end
0148 Tabchar=cell2tab(Tabcell,'=');
0149 set(handles.dimensions,'String',Tabchar)
0150 end
0151 if ~isfield(Field,'ListVarName')
0152 return
0153 end
0154 Txt=Field.ListVarName;
0155 set(handles.variables,'Value',1)
0156 set(handles.variables,'String',[{'*'} Txt])
0157 variables_Callback(handles.variables,[], handles)
0158 set(handles.abscissa,'String',[{''} Txt ])
0159 set(handles.ordinate,'String',Txt)
0160 set(handles.vector_x,'String',[Txt ])
0161 set(handles.vector_y,'String',[Txt ])
0162 set(handles.vector_z,'String',[{''} Txt ])
0163 set(handles.vec_color,'String',[{''} Txt ])
0164 set(handles.coord_x_scalar,'String',[{''} Txt ])
0165 set(handles.coord_y_scalar,'String',[{''} Txt ])
0166 set(handles.coord_x_vectors,'String',[{''} Txt ])
0167 set(handles.coord_y_vectors,'String',[{''} Txt ])
0168 set(handles.coord_z_scalar,'String',[{''} Txt ])
0169 set(handles.coord_z_vectors,'String',[{''} Txt ])
0170 set(handles.scalar,'Value',1)
0171 set(handles.scalar,'String', Txt )
0172
0173 [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Field);
0174 if ~isempty(errormsg)
0175 msgbox_uvmat('ERROR',['error in get_field/Field_input/find_field_indices: ' errormsg])
0176 return
0177 end
0178 [maxdim,imax]=max(NbDim);
0179
0180 if maxdim>=3
0181 set(handles.vector_z,'Visible','on')
0182 set(handles.vector_z,'String',[{''} Txt ])
0183 set(handles.coord_z_vectors,'Visible','on')
0184 set(handles.coord_z_vectors,'String',[{''} Txt ])
0185 set(handles.coord_z_scalar,'Visible','on')
0186 set(handles.coord_z_scalar,'String',[{''} Txt ])
0187 else
0188 set(handles.vector_z,'Visible','off')
0189 set(handles.coord_z_vectors,'Visible','off')
0190 set(handles.coord_z_scalar,'Visible','off')
0191 end
0192 if maxdim>=2
0193 set(handles.check_1Dplot,'Value',0)
0194 if ~isempty(VarType{imax}.vector_x) && ~isempty(VarType{imax}.vector_y)
0195 set(handles.check_vector,'Value',1)
0196 set(handles.vector_x,'Value',VarType{imax}.vector_x)
0197 set(handles.vector_y,'Value',VarType{imax}.vector_y)
0198 set(handles.check_scalar,'Value',0)
0199 else
0200 set(handles.check_scalar,'Value',1)
0201 set(handles.check_vector,'Value',0)
0202 if isfield(VarType{imax},'scalar') && length(VarType{imax}.scalar)>=1
0203 set(handles.scalar,'Value',VarType{imax}.scalar(1))
0204 end
0205 end
0206 check_1Dplot_Callback(handles.check_1Dplot, eventdata, handles)
0207 check_scalar_Callback(handles.check_scalar, eventdata, handles)
0208 check_vector_Callback(handles.check_vector, eventdata, handles)
0209 end
0210
0211
0212
0213
0214
0215 function abscissa_Callback(hObject, eventdata, handles)
0216 hselect_field=get(handles.inputfile,'parent');
0217 Field=get(hselect_field,'UserData');
0218 xdispindex=get(handles.abscissa,'Value');
0219
0220
0221
0222
0223
0224
0225
0226 xlist=get(handles.abscissa,'String');
0227 xname=xlist{xdispindex};
0228 xindex=name2index(xname,Field.ListVarName);
0229 if ~isempty(xindex)
0230 set(handles.variables,'Value',xindex+1)
0231 variables_Callback(hObject, eventdata, handles)
0232 end
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254 function ordinate_Callback(hObject, eventdata, handles)
0255
0256
0257 hselect_field=get(handles.inputfile,'parent');
0258 Field=get(hselect_field,'UserData');
0259
0260 list=get(handles.ordinate,'String');
0261 yindex=get(handles.ordinate,'Value');
0262 yindex=name2index(list{yindex(1)},Field.ListVarName);
0263 if ~isempty(yindex)
0264 set(handles.variables,'Value',yindex+1)
0265 variables_Callback(hObject, eventdata, handles)
0266 end
0267 [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Field);
0268 for icell=1:numel(CellVarIndex)
0269 VarIndex=CellVarIndex{icell};
0270 if ~isempty(find(VarIndex==yindex)) && (isempty(VarType{icell}.coord_x)||~isequal(VarType{icell}.coord_x,VarIndex))
0271 cell_select=icell;
0272 break
0273 end
0274 end
0275
0276 val=get(handles.abscissa,'Value');
0277 set(handles.abscissa,'Value',min(val,2));
0278 coord_x_index=VarType{cell_select}.coord;
0279 coord_x_index=coord_x_index(find(coord_x_index));
0280 set(handles.abscissa,'String',[{''}; (Field.ListVarName(coord_x_index))'; (Field.ListVarName(VarIndex))'])
0281
0282
0283
0284
0285
0286
0287 function vector_x_Callback(hObject, eventdata, handles)
0288 Aindex=get(handles.vector_x,'Value');
0289 Astring=get(handles.vector_x,'String');
0290 VarName=Astring{Aindex};
0291
0292
0293
0294
0295 function vector_y_Callback(hObject, eventdata, handles)
0296 Aindex=get(handles.vector_y,'Value');
0297 Astring=get(handles.vector_y,'String');
0298 VarName=Astring{Aindex};
0299
0300
0301
0302
0303 function scalar_Callback(hObject, eventdata, handles)
0304
0305 Aindex=get(handles.scalar,'Value');
0306 Astring=get(handles.scalar,'String');
0307 VarName=Astring{Aindex};
0308
0309
0310
0311 function update_field(hObject, eventdata, handles,VarName)
0312
0313
0314 hselect_field=get(handles.inputfile,'parent');
0315 Field=get(hselect_field,'UserData');
0316 ivar_sel=[];
0317 for ivar=1:length(Field.ListVarName)
0318 if isequal(Field.ListVarName{ivar},VarName)
0319 ivar_sel=ivar;
0320 break
0321 end
0322 end
0323 if isempty(ivar_sel)
0324 return
0325 end
0326 set(handles.variables,'Value',ivar_sel+1)
0327 variables_Callback(hObject, eventdata, handles)
0328
0329 index=Field.VarDimIndex{ivar_sel};
0330 DimValue=Field.DimValue(index);
0331 ind_1=find(DimValue==1);
0332 index(ind_1)=[];
0333
0334
0335
0336 VarIndex=[];
0337 ind_coordvar=[];
0338 for ilist=1:length(Field.VarDimIndex)
0339 if ~isequal(ilist,ivar_sel)
0340 index_i=Field.VarDimIndex{ilist};
0341 if length(index_i)>1
0342 DimValue=Field.DimValue(index_i);
0343 ind_1=find(DimValue==1);
0344 index_i(ind_1)=[];
0345 if isequal(index,index_i)
0346 VarIndex=[VarIndex ilist];
0347 end
0348 else
0349 idim=find(index==index_i(1));
0350 if ~isempty(idim)
0351 VarIndex=[VarIndex ilist];
0352 if isequal(Field.ListDimName{index_i(1)},Field.ListVarName{ilist})
0353 ind_coordvar=[ind_coordvar length(VarIndex)];
0354 end
0355 end
0356 end
0357 end
0358 end
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371 set(handles.abscissa,'Value',1)
0372 set(handles.ordinate,'Value',1)
0373 set(handles.coord_z_scalar,'Value',1)
0374 set(handles.abscissa,'String',[{''} Field.ListVarName(VarIndex) ])
0375 set(handles.ordinate,'String',[{''} Field.ListVarName(VarIndex) ])
0376 set(handles.coord_z_scalar,'String',[{''} Field.ListVarName(VarIndex) ])
0377 if length(ind_coordvar)>=1
0378 set(handles.abscissa,'Value',ind_coordvar(1)+1)
0379 elseif length(index)==1 && length(VarIndex)>=1
0380 set(handles.abscissa,'Value',2)
0381 end
0382 if length(ind_coordvar)>=2
0383 set(handles.ordinate,'Value',ind_coordvar(2)+1)
0384 elseif length(index)==1 && length(VarIndex)>=2
0385 set(handles.ordinate,'Value',3)
0386 end
0387 if length(ind_coordvar)>=3
0388 set(handles.coord_z_scalar,'Value',ind_coordvar(3)+1)
0389 elseif length(index)==1 && length(VarIndex)>=3
0390 set(handles.coord_z_scalar,'Value',4)
0391 end
0392
0393
0394
0395 function update_UserData(handles)
0396
0397 return
0398
0399 hselect_field=get(handles.inputfile,'parent');
0400 Field=get(hselect_field,'UserData');
0401 if isfield(Field,'VarAttribute')
0402 VarAttribute=Field.VarAttribute;
0403 else
0404 VarAttribute={};
0405 end
0406
0407
0408
0409 test_check_1Dplot=get(handles.check_1Dplot,'Value');
0410 test_scalar=get(handles.check_scalar,'Value');
0411 test_vector=get(handles.check_vector,'Value');
0412
0413
0414 list=get(handles.menu_coord,'String');
0415 index=get(handles.menu_coord,'Value');
0416 transform=list{index};
0417 if ~isequal(transform,'')
0418 Field=feval(transform,Field);
0419 end
0420 VarIndex.u=[];
0421 VarIndex.v=[];
0422 VarIndex.w=[];
0423 VarIndex.A=[];
0424 VarIndex_tot=[];
0425 iuA=[];
0426 if test_scalar
0427 Astring=get(handles.scalar,'String');
0428 Aindex=get(handles.scalar,'Value');
0429 list_var=Astring(Aindex);
0430 VarIndex.A=name2index(list_var,Field.ListVarName);
0431 VarIndex_tot= [VarIndex_tot VarIndex.A];
0432 DimIndex=Field.VarDimIndex{VarIndex.A};
0433 DimValue=Field.DimValue(DimIndex);
0434 ind=find(DimValue==1);
0435 DimIndex(ind)=[];
0436 end
0437 if test_vector
0438 Ustring=get(handles.vector_x,'String');
0439 Uindex=get(handles.vector_x,'Value');
0440 list_var=Ustring{Uindex};
0441 VarIndex.u=name2index(list_var,Field.ListVarName);
0442 Vstring=get(handles.vector_y,'String');
0443 Vindex=get(handles.vector_y,'Value');
0444 list_var=Ustring{Vindex};
0445 VarIndex.v=name2index(list_var,Field.ListVarName);
0446 if isequal(VarIndex.u,VarIndex.A)|isequal(VarIndex.v,VarIndex.A)
0447 iuA=VarIndex.A;
0448 VarIndex_tot(iuA)=[];
0449 end
0450 VarIndex_tot=[VarIndex_tot VarIndex.u VarIndex.v];
0451
0452 DimIndex_u=Field.VarDimIndex{VarIndex.u};
0453 DimValue=Field.DimValue(DimIndex_u);
0454 ind=find(DimValue==1);
0455 DimIndex_u(ind)=[];
0456 DimIndex_v=Field.VarDimIndex{VarIndex.v};
0457 DimValue=Field.DimValue(DimIndex_v);
0458 ind=find(DimValue==1);
0459 DimIndex_v(ind)=[];
0460 if ~isequal(DimIndex_u,DimIndex_v)
0461 warndlg_uvmat('inconsistent dimensions for u and v','ERROR')
0462 set(handles.vector_y,'Value',1);
0463 return
0464 elseif test_scalar & ~isequal(DimIndex_u,DimIndex)
0465 warndlg_uvmat('inconsistent dimensions for vector and scalar represented as vector color','ERROR')
0466 set(handles.scalar,'Value',1);
0467 return
0468 end
0469 DimIndex=DimIndex_u;
0470
0471 end
0472
0473
0474
0475 test_grid=0;
0476 if test_scalar | test_vector
0477 nbdim=length(DimIndex);
0478 if nbdim > 3
0479 warndlg_uvmat('array with more than three dimensions, not supported','ERROR')
0480 return
0481 else
0482 perm_ind=[1:nbdim];
0483 end
0484 if nbdim==3
0485 zstring=get(handles.coord_z_vectors_scalar,'String');
0486 zindex=get(handles.coord_z_vectors_scalar,'Value');
0487 list_var=zstring(zindex);
0488 VarIndex_z=name2index(list_var,Field.ListVarName);
0489 if isequal(VarIndex.A,VarIndex_z)|isequal(VarIndex.u,VarIndex_z)|isequal(VarIndex.v,VarIndex_z)|isequal(VarIndex.w,VarIndex_z)
0490 if zindex ~= 1
0491 set(handles.coord_z_vectors_scalar,'Value',1)
0492 return
0493 end
0494 else
0495 VarIndex_tot=[VarIndex_tot VarIndex_z];
0496 DimIndex_z=Field.VarDimIndex{VarIndex_z};
0497 DimValue=Field.DimValue(DimIndex_z);
0498 ind=find(DimValue==1);
0499 DimIndex_z(ind)=[];
0500 if isequal(DimIndex_z,DimIndex)
0501 VarAttribute{VarIndex_z}.Role='coord_z';
0502 elseif length(DimIndex_z)==1
0503 VarAttribute{VarIndex_z}.Role=Field.ListDimName{DimIndex_z};
0504 ind_z=find(DimIndex==DimIndex_z(1));
0505 perm_ind(ind_z)=1;
0506 test_grid=1;
0507 else
0508 warndlg_uvmat('multiple dimensions for the z coordinate','ERROR')
0509 return
0510 end
0511 end
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521 end
0522 end
0523
0524
0525 ystring=get(handles.ordinate,'String');
0526 yindex=get(handles.ordinate,'Value');
0527 list_var=ystring(yindex);
0528 VarIndex.y=name2index(list_var,Field.ListVarName);
0529 if isequal(VarIndex.A,VarIndex.y)
0530 set(handles.coord_y_scalar,'Value',1)
0531 elseif isequal(VarIndex.u,VarIndex.y)||isequal(VarIndex.v,VarIndex.y)||isequal(VarIndex.w,VarIndex.y)
0532 set(handles.coord_y_vectors,'Value',1)
0533 else
0534 for ivar=1:length(VarIndex.y)
0535 VarAttribute{VarIndex.y(ivar)}.Role='coord_y';
0536 end
0537 VarIndex_tot=[VarIndex_tot VarIndex.y];
0538 end
0539 if (test_scalar | test_vector) & ~isempty(VarIndex.y)
0540 DimIndex_y=Field.VarDimIndex{VarIndex.y};
0541 if length(DimIndex_y)==1
0542 ind_y=find(DimIndex==DimIndex_y(1));
0543 test_grid=1;
0544 if nbdim==3
0545 VarAttribute{VarIndex.y}.Role=Field.ListDimName{DimIndex_y};
0546 perm_ind(ind_y)=2;
0547 elseif nbdim==2
0548 VarAttribute{VarIndex.y}.Role=Field.ListDimName{DimIndex_y};
0549 perm_ind(ind_y)=1;
0550 end
0551 elseif test_grid
0552 warndlg_uvmat('the dimension of the y coordinate variable should be 1','ERROR')
0553 end
0554 end
0555
0556
0557 xstring=get(handles.abscissa,'String');
0558 xindex=get(handles.abscissa,'Value');
0559 list_var=xstring(xindex);
0560 VarIndex.x=name2index(list_var,Field.ListVarName);
0561 if length(VarIndex.x)==1
0562 DimIndex_x=Field.VarDimIndex{VarIndex.x};
0563 DimValue=Field.DimValue(DimIndex_x);
0564 ind=find(DimValue==1);
0565 DimIndex_x(ind)=[];
0566 VarAttribute{VarIndex.x}.Role=Field.ListDimName{DimIndex_x};
0567
0568 index_detect=find(VarIndex_tot==VarIndex.x);
0569 else
0570 index_detect=[];
0571 end
0572 if isempty(index_detect)
0573 VarIndex_tot=[VarIndex_tot VarIndex.x];
0574 elseif ~test_check_1Dplot
0575 VarIndex.x=[];
0576 set(handles.abscissa,'Value',1)
0577 end
0578
0579 if (test_scalar | test_vector) & ~isempty(VarIndex.x)
0580 DimIndex_x=Field.VarDimIndex{VarIndex.x};
0581 if length(DimIndex_x)==1
0582 ind_x=find(DimIndex==DimIndex_x(1));
0583 if nbdim==3
0584
0585 perm_ind(ind_x)=3;
0586 elseif nbdim==2
0587
0588 perm_ind(ind_x)=2;
0589 end
0590 if isequal(perm_ind,1:nbdim)
0591 test_grid=0;
0592 end
0593 DimIndex=DimIndex(perm_ind);
0594 elseif test_grid
0595 warndlg_uvmat('the dimension of the x coordinate variable should be 1','ERROR')
0596 end
0597 if isequal(DimIndex_x,DimIndex)
0598 VarAttribute{VarIndex.x}.Role='coord_x';
0599 end
0600 end
0601
0602
0603 SubField.ListGlobalAttribute{1}='InputFile';
0604 SubField.InputFile=get(handles.inputfile,'String');
0605 SubField.ListDimName=Field.ListDimName;
0606 SubField.DimValue=Field.DimValue;
0607 SubField.ListVarName=Field.ListVarName(VarIndex_tot);
0608 SubField.VarDimIndex=Field.VarDimIndex(VarIndex_tot);
0609
0610 testperm=0;
0611 testattr=0;
0612 for ivar=VarIndex.u
0613 VarAttribute{ivar}.Role='vector_x';
0614 testattr=1;
0615 if test_grid
0616 VarDimIndex{ivar}=DimIndex;
0617 testperm=1;
0618 end
0619 end
0620 for ivar=VarIndex.v
0621 VarAttribute{ivar}.Role='vector_y';
0622 testattr=1;
0623 if test_grid
0624 VarDimIndex{ivar}=DimIndex;
0625 testperm=1;
0626 end
0627 end
0628 for ivar=VarIndex.A
0629 if test_grid
0630 VarDimIndex{ivar}=DimIndex;
0631 testperm=1;
0632 end
0633 if isempty(iuA)
0634 VarAttribute{ivar}.Role='scalar';
0635 testattr=1;
0636 else
0637 VarAttribute=[VarAttribute VarAttribute(ivar)];
0638 nbattr=length(VarAttribute);
0639 VarAttribute{nbattr}.Role='scalar';
0640 testattr=1;
0641 end
0642 end
0643 if testperm
0644 SubField.VarDimIndex=VarDimIndex(VarIndex_tot);
0645 end
0646 if testattr
0647 SubField.VarAttribute=VarAttribute(VarIndex_tot);
0648 end
0649 set(hselect_field,'UserData',Field)
0650
0651
0652
0653 function plot_Callback(hObject, eventdata, handles)
0654
0655 list=get(handles.ACTION,'String');
0656 index=get(handles.ACTION,'Value');
0657 ACTION=list{index};
0658 hselect_field=get(handles.inputfile,'parent');
0659 feval(ACTION,hselect_field);
0660 browse_fig(handles.list_fig);
0661
0662
0663
0664 function PLOT(hget_field)
0665
0666 [SubField,errormsg]=read_get_field(hget_field);
0667 handles=guidata(hget_field);
0668 list_fig=get(handles.list_fig,'String');
0669 val=get(handles.list_fig,'Value');
0670 if strcmp(list_fig{val},'uvmat')
0671 uvmat(SubField)
0672 else
0673 hfig=str2num(list_fig{val});
0674 if isempty(hfig)
0675 hfig=figure;
0676 list_fig=[list_fig;num2str(hfig)];
0677 set(handles.list_fig,'String',list_fig);
0678 haxes=axes;
0679 else
0680 figure(hfig);
0681 end
0682 haxes=findobj(hfig,'Type','axes');
0683 plot_field(SubField,haxes)
0684 end
0685
0686
0687
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709
0710
0711
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725
0726
0727
0728
0729
0730
0731
0732
0733
0734
0735
0736
0737
0738
0739
0740
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785
0786
0787
0788
0789
0790
0791
0792
0793
0794
0795
0796
0797
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815
0816
0817
0818
0819
0820
0821
0822
0823
0824
0825
0826
0827
0828
0829
0830
0831
0832
0833
0834
0835
0836
0837
0838
0839
0840
0841
0842
0843
0844
0845
0846
0847
0848
0849
0850
0851
0852
0853
0854
0855
0856
0857
0858
0859
0860
0861
0862
0863
0864
0865
0866
0867
0868
0869
0870
0871
0872
0873
0874
0875
0876
0877
0878
0879
0880
0881
0882
0883
0884
0885
0886
0887
0888
0889
0890
0891
0892
0893
0894
0895
0896
0897
0898
0899
0900
0901
0902
0903
0904
0905
0906
0907
0908
0909
0910
0911
0912
0913
0914
0915
0916
0917
0918
0919
0920
0921
0922
0923
0924
0925
0926
0927
0928
0929
0930
0931
0932
0933
0934
0935
0936
0937
0938
0939
0940
0941
0942
0943
0944
0945
0946
0947
0948
0949
0950
0951
0952
0953
0954
0955
0956
0957
0958
0959
0960
0961
0962
0963
0964
0965
0966
0967
0968
0969
0970
0971
0972
0973
0974
0975
0976
0977
0978
0979
0980
0981
0982
0983
0984
0985
0986
0987
0988
0989
0990
0991
0992
0993
0994
0995
0996
0997
0998
0999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029 function plot_histo_Callback(hObject, eventdata, handles)
1030
1031
1032
1033
1034
1035 leg={};
1036 n=0;
1037 if (get(handles.cm_switch,'Value')==1)
1038 Uval_p=Uval_cm;
1039 Vval_p=Vval_cm;
1040 Uhist_p=Uhist_cm;
1041 Vhist_p=Vhist_cm;
1042 xlab='velocity (cm/s)';
1043 else
1044 Uval_p=Uval;
1045 Vval_p=Vval;
1046 Uhist_p=Uhist;
1047 Vhist_p=Vhist;
1048 xlab='velocity (pixels)';
1049 end
1050 if (get(handles.vector_y,'Value') == 1)
1051 hhh=figure(2);
1052 hold on
1053 title([filebase ', ' strindex ', ' fieldtitle])
1054 plot(Uval_p,Uhist_p,'b-')
1055 n=n+1;
1056 leg{n}='Uhist';
1057 xlabel(xlab)
1058 end
1059 if (get(handles.Vhist_input,'Value') == 1)
1060 hhh=figure(2);
1061 hold on
1062 title([filebase ', ' strindex ', ' fieldtitle])
1063 plot(Vval_p,Vhist_p,'r-')
1064 n=n+1;
1065 leg{n}='Vhist';
1066 xlabel(xlab);
1067 end
1068 if (get(handles.Chist_input,'Value') == 1)
1069 hhhh=figure(3);
1070 hold on
1071 title([filebase ', ' strindex ', ' fieldtitle])
1072 plot(Cval,Chist,'k-')
1073 leg{1}='Chist';
1074 end
1075
1076 grid on
1077 legend(leg);
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156 function peaklocking(handles)
1157
1158
1159
1160
1161 global hfig1 hfig2 hfig3
1162 global nbb Uval Vval Uhist Vhist
1163 global xval xerror yval yerror
1164
1165 set(handles.vector_y,'Value',1)
1166 set(handles.Vhist_input,'Value',1)
1167 set(handles.cm_switch,'Value',0)
1168
1169
1170
1171 minimU=round(min(Uval)-0.5)+0.5;
1172 maximU=round(max(Uval)-0.5)+0.5;
1173 minim_fin=(minimU-0.5+1/(2*nbb));
1174 maxim_fin=(maximU+0.5-1/(2*nbb));
1175 nb_bin_min= round(-(minim_fin - min(Uval))*nbb);
1176 nb_bin_max=round((maxim_fin -max(Uval))*nbb);
1177 Uval=[minim_fin:(1/nbb):maxim_fin];
1178 histu_min=zeros(nb_bin_min,1);
1179 histu_max=zeros(nb_bin_max,1);
1180 Uhist=[histu_min; Uhist ;histu_max];
1181
1182
1183 minimV=round(min(Vval-0.5)+0.5);
1184 maximV=round(max(Vval-0.5)+0.5);
1185 minim_fin=minimV-0.5+1/(2*nbb);
1186 maxim_fin=maximV+0.5-1/(2*nbb);
1187 nb_bin_min=round((min(Vval) - minim_fin)*nbb);
1188 nb_bin_max=round((maxim_fin -max(Vval))*nbb);
1189 Vval=[minim_fin:(1/nbb):maxim_fin];
1190 histu_min=zeros(nb_bin_min,1);
1191 histu_max=zeros(nb_bin_max,1);
1192 Vhist=[histu_min; Vhist ;histu_max];
1193
1194
1195
1196
1197
1198 [Uhistinter,xval,xerror]=peaklock(nbb,minimU,maximU,Uhist);
1199 [Vhistinter,yval,yerror]=peaklock(nbb,minimV,maximV,Vhist);
1200
1201
1202 Uval_ind=find(Uhist>=10);
1203 ind_min=min(Uval_ind);
1204 ind_max=max(Uval_ind);
1205 U_min=Uval(ind_min);
1206 U_max=Uval(ind_max);
1207
1208
1209 Vval_ind=find(Vhist>=10);
1210 ind_min=min(Vval_ind);
1211 ind_max=max(Vval_ind);
1212 V_min=Vval(ind_min);
1213 V_max=Vval(ind_max);
1214
1215 figure(4)
1216 plot(Uval,Uhist,'b')
1217 grid on
1218 hold on
1219 plot(Uval,Uhistinter,'r');
1220 hold off
1221
1222 figure(5)
1223 plot(Vval,Vhist,'b')
1224 grid on
1225 hold on
1226 plot(Vval,Vhistinter,'r');
1227 hold off
1228
1229 figure(6)
1230 hfig4=subplot(2,1,1);
1231 hfig5=subplot(2,1,2);
1232 axes(hfig4)
1233 plot(xval,xerror)
1234 axis([U_min U_max -0.4 0.4])
1235 xlabel('velocity u (pix)')
1236 ylabel('peaklocking error (pix)')
1237 grid on
1238 axes(hfig5)
1239 plot(yval,yerror)
1240 axis([V_min V_max -0.4 0.4]);
1241 xlabel('velocity v (pix)')
1242 ylabel('peaklocking error (pix)')
1243 grid on
1244
1245
1246
1247 function variables_Callback(hObject, eventdata, handles)
1248 Tabchar={''};
1249 Tabcell=[];
1250 hselect_field=get(handles.variables,'parent');
1251 Field=get(hselect_field,'UserData');
1252 index=get(handles.variables,'Value');
1253 if isequal(index,1)
1254 set(handles.attributes_txt,'String','global attributes')
1255
1256 if isfield(Field,'ListGlobalAttribute') && ~isempty(Field.ListGlobalAttribute)
1257 for iline=1:length(Field.ListGlobalAttribute)
1258 Tabcell{iline,1}=Field.ListGlobalAttribute{iline};
1259 if isfield(Field, Field.ListGlobalAttribute{iline})
1260 eval(['val=Field.' Field.ListGlobalAttribute{iline} ';'])
1261 if ischar(val);
1262 Tabcell{iline,2}=val;
1263 else
1264 Tabcell{iline,2}=num2str(val);
1265 end
1266 end
1267 end
1268 Tabchar=cell2tab(Tabcell,'=');
1269 end
1270 else
1271
1272 list_var=get(handles.variables,'String');
1273 var_select=list_var{index};
1274 set(handles.attributes_txt,'String', ['attributes of ' var_select])
1275 if isfield(Field,'VarAttribute')& length(Field.VarAttribute)>=index-1
1276
1277 VarAttr=Field.VarAttribute{index-1};
1278 if isstruct(VarAttr)
1279 attr_list=fieldnames(VarAttr);
1280 for iline=1:length(attr_list)
1281 Tabcell{iline,1}=attr_list{iline};
1282 eval(['val=VarAttr.' attr_list{iline} ';'])
1283 if ischar(val);
1284 Tabcell{iline,2}=val;
1285 else
1286 Tabcell{iline,2}=num2str(val);
1287 end
1288 end
1289 end
1290 end
1291
1292 end
1293 if ~isempty(Tabcell)
1294 Tabchar=cell2tab(Tabcell,'=');
1295 Tabchar=[{''};Tabchar];
1296 end
1297 set(handles.attributes,'String',Tabchar);
1298
1299
1300
1301
1302
1303 if isfield(Field,'VarDimIndex')
1304 Tabdim={};
1305 if isequal(index,1)
1306 dim_indices=1:length(Field.ListDimName);
1307 set(handles.dimensions_txt,'String', 'dimensions')
1308 else
1309 dim_indices=Field.VarDimIndex{index-1};
1310 set(handles.dimensions_txt,'String', ['dimensions of ' var_select])
1311 end
1312 for iline=1:length(dim_indices)
1313 Tabdim{iline,1}=Field.ListDimName{dim_indices(iline)};
1314 Tabdim{iline,2}=num2str(Field.DimValue(dim_indices(iline)));
1315 end
1316 Tabchar=cell2tab(Tabdim,'=');
1317 Tabchar=[{''} ;Tabchar];
1318 set(handles.dimensions,'String',Tabchar)
1319 end
1320
1321
1322 function check_1Dplot_Callback(hObject, eventdata, handles)
1323 val=get(handles.check_1Dplot,'Value');
1324 if isequal(val,0)
1325 set(handles.Panel1Dplot,'Visible','off')
1326
1327
1328
1329
1330
1331 else
1332 set(handles.Panel1Dplot,'Visible','on')
1333
1334
1335
1336
1337
1338
1339 end
1340
1341
1342 function check_scalar_Callback(hObject, eventdata, handles)
1343 val=get(handles.check_scalar,'Value');
1344 if isequal(val,0)
1345 set(handles.PanelScalar,'Visible','off')
1346
1347
1348
1349
1350
1351 else
1352 set(handles.PanelScalar,'Visible','on')
1353
1354
1355
1356
1357
1358
1359 end
1360
1361
1362
1363 function check_vector_Callback(hObject, eventdata, handles)
1364 val=get(handles.check_vector,'Value');
1365 if isequal(val,0)
1366 set(handles.PanelVectors,'Visible','off')
1367 else
1368 set(handles.PanelVectors,'Visible','on')
1369 end
1370
1371
1372
1373
1374 function mouse_up_gui(ggg,eventdata,handles)
1375 if isequal(get(ggg,'SelectionType'),'alt')
1376 message='';
1377 global CurData
1378 inputfield=get(handles.inputfile,'String');
1379 if exist(inputfield,'file')
1380 CurData=nc2struct(inputfield);
1381 else
1382 CurData=get(ggg,'UserData');
1383 end
1384
1385 evalin('base','global CurData')
1386 evalin('base','CurData')
1387 end
1388
1389
1390
1391 function ACTION_Callback(hObject, eventdata, handles)
1392 list_ACTION=get(handles.ACTION,'String');
1393 index_ACTION=get(handles.ACTION,'Value');
1394 ACTION= list_ACTION{index_ACTION};
1395 path_get_field=which('get_field');
1396 list_path=get(handles.ACTION,'UserData');
1397 nb_builtin=0;
1398 for ilist=1:length(list_path)
1399 if isequal(list_path{ilist},path_get_field)
1400 nb_builtin=nb_builtin+1;
1401 else
1402 break
1403 end
1404 end
1405 if nb_builtin==0
1406 get_field_OpeningFcn(hObject, eventdata, handles)
1407 return
1408 end
1409
1410
1411 if isequal(ACTION,'more...')
1412 pathfct=fileparts(path_get_field);
1413 browse_name=fullfile(path_get_field,'FIELD_FCT');
1414 if length(list_path)>nb_builtin
1415 browse_name=list_path{end};
1416 end
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431 [FileName, PathName] = uigetfile( ...
1432 {'*.m', ' (*.m)';
1433 '*.m', '.m files '; ...
1434 '*.*', 'All Files (*.*)'}, ...
1435 'Pick a file',browse_name);
1436 if length(FileName)<2
1437 return
1438 end
1439 ext_fct=FileName(end-1:end);
1440 if ~isequal(ext_fct,'.m')
1441 msgbox_uvmat('ERROR','a Matlab function .m must be introduced');
1442 return
1443 end
1444 ACTION=FileName(1:end-2);
1445
1446
1447 menu_str=update_menu(handles.ACTION,ACTION);
1448 index_ACTION=get(handles.ACTION,'Value');
1449 list_path{index_ACTION}=PathName;
1450 if length(menu_str)>nb_builtin+5;
1451 nbremove=length(menu_str)-nb_builtin-5;
1452 menu_str(nb_builtin+1:end-5)=[];
1453 list_path(nb_builtin+1:end-4)=[];
1454 index_ACTION=index_ACTION-nbremove;
1455 set(handles.ACTION,'Value',index_ACTION)
1456 set(handles.ACTION,'String',menu_str)
1457 end
1458 list_path{index_ACTION}=PathName;
1459 set(handles.ACTION,'UserData',list_path);
1460 set(handles.path_action,'enable','inactive')
1461
1462
1463 dir_perso=prefdir;
1464 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
1465 for ilist=nb_builtin+1:length(menu_str)-1
1466 get_field_fct{ilist-nb_builtin}=fullfile(list_path{ilist},[menu_str{ilist} '.m']);
1467 end
1468 if exist(profil_perso,'file')
1469 save(profil_perso,'get_field_fct','-append')
1470 else
1471 txt=ver;
1472 Release=txt(1).Release;
1473 relnumb=str2num(Release(3:4));
1474 if relnumb >= 14
1475 save(profil_perso,'get_field_fct','-V6')
1476 else
1477 save(profil_perso, 'get_field_fct')
1478 end
1479 end
1480 end
1481
1482
1483 PathName=list_path{index_ACTION};
1484 if ~isequal(path_get_field,PathName)
1485 CurrentPath=fileparts(which(ACTION));
1486 if ~isequal(PathName,CurrentPath)
1487 addpath(PathName)
1488 errormsg=check_functions;
1489 msgbox_uvmat('CONFIRMATION',[['path ' PathName ' added to the current Matlab pathes'];errormsg])
1490 end
1491 end
1492 set(handles.path_action,'String',PathName);
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562 if ~isequal(ACTION,'PLOT')
1563 varargout=feval(ACTION);
1564 test_1Dplot=[];
1565 test_scalar=[];
1566 test_vector=[];
1567 for ilist=1:length(varargout)-1
1568 switch varargout{ilist}
1569
1570 case 'check_1Dplot'
1571 test_1Dplot=isequal(lower(varargout{ilist+1}),'y');
1572 case 'check_scalar'
1573 test_scalar=isequal(lower(varargout{ilist+1}),'y');
1574 case 'check_vector'
1575 test_vector=isequal(lower(varargout{ilist+1}),'y');
1576 end
1577 end
1578 if test_1Dplot==0
1579 set(handles.check_1Dplot,'Value',0);
1580 end
1581 if test_1Dplot==1
1582 set(handles.check_1Dplot,'Value',1);
1583 end
1584 if test_scalar==0
1585 set(handles.check_scalar,'Value',0);
1586 end
1587 if test_scalar==1
1588 set(handles.check_scalar,'Value',1);
1589 end
1590 if test_vector==0
1591 set(handles.check_vector,'Value',0);
1592 end
1593 if test_vector==1
1594 set(handles.check_vector,'Value',1);
1595 end
1596 check_1Dplot_Callback(hObject, eventdata, handles)
1597 check_scalar_Callback(hObject, eventdata, handles)
1598 check_vector_Callback(hObject, eventdata, handles)
1599 end
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637 function HELP_Callback(hObject, eventdata, handles)
1638 path_to_uvmat=which ('uvmat');
1639 pathelp=fileparts(path_to_uvmat);
1640 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
1641 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
1642 else
1643 web([helpfile '#get_field'])
1644 end
1645
1646
1647
1648
1649 function browse_fig(menu_handle)
1650 hh=findobj(allchild(0),'Type','figure');
1651 ilist=0;
1652 list={};
1653 for ifig=1:length(hh)
1654 name=get(hh(ifig),'Name');
1655 if ~isequal(name,'uvmat')
1656
1657
1658
1659 hchild=get(hh(ifig),'children');
1660 nbaxe=0;
1661 for ichild=1:length(hchild)
1662 Type=get(hchild(ichild),'Type');
1663 Tag=get(hchild(ichild),'Tag');
1664 if isequal(Type,'axes')
1665 if ~isequal(Tag,'Colorbar')& ~isequal(Tag,'legend')
1666 nbaxe=nbaxe+1;
1667 end
1668 end
1669 end
1670 if nbaxe==1
1671 ilist=ilist+1;
1672 list{ilist,1}=num2str(hh(ifig));
1673 elseif nbaxe>1
1674 for iaxe=1:nbaxe
1675 ilist=ilist+1;
1676 list{ilist,1}=[num2str(hh(ifig)) '_' num2str(iaxe)];
1677 end
1678 end
1679 end
1680 end
1681 list=['new fig...';'uvmat';list];
1682 set(menu_handle,'Value',1)
1683 set(menu_handle,'String',list)
1684
1685
1686
1687 function list_fig_Callback(hObject, eventdata, handles)
1688
1689 list_fig=get(handles.list_fig,'String');
1690 fig_val=get(handles.list_fig,'Value');
1691 plot_fig=list_fig{fig_val};
1692 if isequal(plot_fig,'uvmat')
1693 huvmat=findobj(allchild(0),'name','uvmat');
1694 if ~isempty(huvmat)
1695 uistack(huvmat,'top')
1696 end
1697 elseif ~isequal(plot_fig,'new fig...') & ~isequal(plot_fig,'uvmat')
1698 sep=regexp(plot_fig,'_');
1699 if ~isempty(sep)
1700 plot_fig=plot_fig([1:sep-1]);
1701 end
1702 if ishandle(str2num(plot_fig))
1703 figure(str2num(plot_fig))
1704 else
1705 browse_fig(handles.list_fig);
1706 end
1707 end
1708
1709
1710
1711
1712 function VarIndex_y=name2index(cell_str,ListVarName)
1713 VarIndex_y=[];
1714 if ischar(cell_str)
1715 for ivar=1:length(ListVarName)
1716 varlist=ListVarName{ivar};
1717 if isequal(varlist,cell_str)
1718 VarIndex_y= ivar;
1719 break
1720 end
1721 end
1722 elseif iscell(cell_str)
1723 for isel=1:length(cell_str)
1724 varsel=cell_str{isel};
1725 for ivar=1:length(ListVarName)
1726 varlist=ListVarName{ivar};
1727 if isequal(varlist,varsel)
1728 VarIndex_y=[VarIndex_y ivar];
1729 end
1730 end
1731 end
1732 end
1733
1734
1735
1736 function vector_z_Callback(hObject, eventdata, handles)
1737 Aindex=get(handles.vector_z,'Value');
1738 Astring=get(handles.vector_z,'String');
1739 VarName=Astring{Aindex};
1740 update_field(hObject, eventdata, handles,VarName)
1741
1742
1743 function coord_z_scalar_Callback(hObject, eventdata, handles)
1744 hselect_field=get(handles.inputfile,'parent');
1745 Field=get(hselect_field,'UserData');
1746 list=get(handles.coord_z_scalar,'String');
1747 yindex=get(handles.coord_z_scalar,'Value');
1748 xindex=name2index(list{yindex(1)},Field.ListVarName);
1749 if ~isempty(xindex)
1750 set(handles.variables,'Value',xindex+1)
1751 variables_Callback(hObject, eventdata, handles)
1752 end
1753 Field.VarIndex.z=xindex;
1754 set(hselect_field,'UserData',Field);
1755
1756
1757 function coord_x_scalar_Callback(hObject, eventdata, handles)
1758
1759
1760 function coord_y_scalar_Callback(hObject, eventdata, handles)
1761
1762
1763
1764 function coord_y_vectors_Callback(hObject, eventdata, handles)
1765
1766
1767 function coord_x_vectors_Callback(hObject, eventdata, handles)
1768
1769
1770
1771
1772
1773 function vec_color_Callback(hObject, eventdata, handles)
1774
1775
1776
1777 function MenuOpen_Callback(hObject, eventdata, handles)
1778
1779
1780
1781
1782
1783
1784 function MenuExport_Callback(hObject, eventdata, handles)
1785
1786
1787
1788
1789
1790
1791 function MenuBrowse_Callback(hObject, eventdata, handles)
1792
1793 oldfile=get(handles.inputfile,'String');
1794 testrootfile=0;
1795 testsubdir=0;
1796 if isempty(oldfile)|isequal(oldfile,'')
1797 oldfile='';
1798 dir_perso=prefdir;
1799 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
1800 if exist(profil_perso,'file')
1801 h=load (profil_perso);
1802 if isfield(h,'RootPath')
1803 RootPath=h.RootPath;
1804 end
1805 if isfield(h,'SubDir')
1806 SubDir=h.SubDir;
1807 if ~isempty(SubDir)
1808 testsubdir=1;
1809 end
1810 end
1811 if isfield(h,'RootFile')
1812 RootFile=h.RootFile;
1813 if ~isempty(RootFile)
1814 testrootfile=1;
1815 end
1816 end
1817 end
1818 end
1819 if testrootfile
1820 if ~testsubdir
1821 oldfile=fullfile(RootPath,RootFile);
1822 else
1823 oldfile=fullfile(RootPath,SubDir,RootFile);
1824 end
1825 end
1826 [FileName, PathName] = uigetfile( ...
1827 {'*.nc', ' *.nc';...
1828 '*.cdf', ' *.cdf';...
1829 '*.*', 'All Files (*.*)'}, ...
1830 'Pick a file',oldfile);
1831
1832
1833 fileinput=[PathName FileName];
1834 testblank=findstr(fileinput,' ');
1835 if ~isempty(testblank)
1836 warndlg_uvmat(['The input file name ' fileinput ' contains blank character : This is not allowed. Please change name'],'ERROR')
1837 return
1838 end
1839 sizf=size(fileinput);
1840 if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end
1841 set(handles.inputfile,'String',fileinput)
1842 inputfile_Callback(hObject, eventdata, handles)
1843
1844
1845
1846 MenuFile_1=fileinput;
1847 MenuFile_2=get(handles.MenuFile_1,'Label');
1848 MenuFile_3=get(handles.MenuFile_2,'Label');
1849 MenuFile_4=get(handles.MenuFile_3,'Label');
1850 MenuFile_5=get(handles.MenuFile_4,'Label');
1851 set(handles.MenuFile_1,'Label',MenuFile_1)
1852 set(handles.MenuFile_2,'Label',MenuFile_2)
1853 set(handles.MenuFile_3,'Label',MenuFile_3)
1854 set(handles.MenuFile_4,'Label',MenuFile_4)
1855 set(handles.MenuFile_5,'Label',MenuFile_5)
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869 function MenuFile_1_Callback(hObject, eventdata, handles)
1870
1871
1872
1873
1874
1875
1876 function MenuFile_2_Callback(hObject, eventdata, handles)
1877
1878
1879
1880
1881
1882
1883 function MenuFile_3_Callback(hObject, eventdata, handles)
1884
1885
1886
1887
1888
1889
1890 function MenuFile_4_Callback(hObject, eventdata, handles)
1891
1892
1893
1894
1895
1896
1897 function MenuFile_5_Callback(hObject, eventdata, handles)
1898
1899
1900
1901
1902
1903
1904 function ExportField_Callback(hObject, eventdata, handles)
1905
1906
1907
1908
1909