Changeset 446 for trunk/src/civ.m
- Timestamp:
- Jun 11, 2012, 9:33:54 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r444 r446 1021 1021 1022 1022 1023 %-------------- orm----------------------------------------------------------1023 %------------------------------------------------------------------------ 1024 1024 % --- Main lauch command, called by RUN and BATCH 1025 1025 function errormsg=launch_jobs(hObject, eventdata, handles, batch) 1026 %----------------------------------------------------------------------- 1026 %------------------------------------------------------------------------ 1027 1027 errormsg='';%default 1028 1028 … … 1076 1076 if isfield(handles,'status') 1077 1077 set(handles.status,'Value',0);%suppress status display 1078 status_Callback( hObject, eventdata, handles)1078 status_Callback([], [], handles) 1079 1079 end 1080 1080 … … 2100 2100 detect=exist(filename,'file')==2; 2101 2101 if detect% if a netcdf file already exists 2102 r=regexp(subdir_civ1_new,'(?<root>.*\D)(?<num1>\d+)$','names');%detect whether name ends by a number 2103 if isempty(r) 2104 r(1).root=[subdir_civ1_new '_']; 2105 r(1).num1='0'; 2102 answer=msgbox_uvmat('INPUT_Y-N',['delete files in ' subdir_civ1_new]); 2103 if ~strcmp(answer,'Yes') 2104 r=regexp(subdir_civ1_new,'(?<root>.*\D)(?<num1>\d+)$','names');%detect whether name ends by a number 2105 if isempty(r) 2106 r(1).root=[subdir_civ1_new '_']; 2107 r(1).num1='0'; 2108 end 2109 subdir_civ1_new=[r(1).root num2str(str2num(r(1).num1)+1)];%increment the index by 1 or put 1 2110 subdir_civ2=subdir_civ1_new; 2106 2111 end 2107 subdir_civ1_new=[r(1).root num2str(str2num(r(1).num1)+1)];%increment the index by 1 or put 12108 % indstr=regexp(subdir_civ1_new,'\D');2109 % if indstr(end)<length(subdir_civ1_new) %subdir_civ1 ends by a number2110 % vers=str2double(subdir_civ1_new(indstr(end)+1:end))+1;2111 % subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) num2str(vers)];2112 % else2113 % vers=vers+1;2114 % subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) '_' num2str(vers)];2115 % end2116 subdir_civ2=subdir_civ1_new;2117 2112 break 2118 2113 end
Note: See TracChangeset
for help on using the changeset viewer.