Changeset 246 for trunk/src/civ.m
- Timestamp:
- Apr 28, 2011, 10:52:31 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r244 r246 62 62 % Update handles structure 63 63 guidata(hObject, handles); 64 64 set(hObject,'WindowButtonUpFcn',{'mouse_up_GUI',handles}) %set mouse action (zoom on uicontrols) 65 65 %default initial parameters 66 66 filebase=''; % root file name ('filebase'.civ) … … 334 334 browse.nom_type_nc=nom_type; 335 335 ind_opening=2;% propose 'fix' as the default option 336 Data=nc2struct(fileinput,[]); 337 if isfield(Data,'absolut_time_T0')%test for civx files 336 Data=nc2struct(fileinput,'ListGlobalAttribute','CivStage','absolut_time_T0','fix','patch','civ2','fix2'); 337 if ~isempty(Data.CivStage)%test for civ files 338 ind_opening=Data.CivStage; 339 set(handles.CivAll,'Value',3) 340 end 341 if ~isempty(Data.absolut_time_T0)%test for civx files 342 set(handles.CivAll,'Value',1) 338 343 if isfield(Data,'fix') && isequal(Data.fix,1) 339 344 ind_opening=3; 340 345 end 341 if is field(Data,'patch') && isequal(Data.patch,1)346 if isequal(Data.patch,1) 342 347 ind_opening=4; 343 348 end 344 if is field(Data,'civ2') && isequal(Data.civ2,1)349 if isequal(Data.civ2,1) 345 350 ind_opening=5; 346 351 end 347 if isfield(Data,'fix2') &&isequal(Data.fix2,1)352 if isequal(Data.fix2,1) 348 353 ind_opening=6; 349 354 end … … 4683 4688 par_civ1.T0=0; 4684 4689 par_civ1.Dt=1; 4685 Data=civ_uvmat(par_civ1); 4690 Param.Civ1=par_civ1; 4691 Data=civ_uvmat(Param); 4686 4692 % stepx=str2num(par_civ1.dx); 4687 4693 % stepy=str2num(par_civ1.dy); … … 4877 4883 function open_view_field(hObject, eventdata) 4878 4884 %------------------------------------------------------------------- 4879 list=get( gcbo,'String');4880 index=get( gcbo,'Value');4881 rootroot=get( gcbo,'UserData');4885 list=get(hObject,'String'); 4886 index=get(hObject,'Value'); 4887 rootroot=get(hObject,'UserData'); 4882 4888 filename=list{index}; 4883 4889 ind_dot=findstr(filename,'...'); 4884 4890 filename=filename(1:ind_dot-1); 4885 4891 filename=fullfile(rootroot,filename); 4892 delete(get(hObject,'parent'))%delete the display figure to stop the check process 4886 4893 if exist(filename,'file')%visualise the vel field if it exists 4887 %[Field,VelTypeOut]=read_civxdata(filename);4888 %view_field(Field)4889 4894 uvmat(filename) 4890 4895 set(gcbo,'Value',1)
Note: See TracChangeset
for help on using the changeset viewer.