@@ -170,10 +170,11 @@ function delete_files_(csFiles)
170170% 9/29/17 JJJ: Displaying the version number of the program and what's used. #Tested
171171function [vcVer, vcDate] = version_()
172172if nargin<1, vcFile_prm = ''; end
173- vcVer = 'v0.1.9 ';
173+ vcVer = 'v0.2.1 ';
174174vcDate = '7/24/2018';
175175if nargout==0
176176 fprintf('%s (%s) installed\n', vcVer, vcDate);
177+ edit_('change_log.txt');
177178end
178179end %func
179180
@@ -1246,17 +1247,25 @@ function download_sample_()
12461247%--------------------------------------------------------------------------
12471248function vlSuccess = download_files_(csLink, csDest)
12481249% download file from the web
1250+ nRetry = 5;
1251+
12491252if nargin<2, csDest = link2file_(csLink); end
12501253vlSuccess = false(size(csLink));
12511254for iFile=1:numel(csLink)
1252- try
1253- % download from list of files
1254- fprintf('\tDownloading %s: ', csLink{iFile});
1255- vcFile_out1 = websave(csDest{iFile}, csLink{iFile});
1256- fprintf('saved to %s\n', vcFile_out1);
1257- vlSuccess(iFile) = 1;
1258- catch
1259- fprintf(2, '\n\tCannot download. Check internet connection.\n');
1255+ for iRetry = 1:nRetry
1256+ try
1257+ % download from list of files
1258+ fprintf('\tDownloading %s: ', csLink{iFile});
1259+ vcFile_out1 = websave(csDest{iFile}, csLink{iFile});
1260+ fprintf('saved to %s\n', vcFile_out1);
1261+ vlSuccess(iFile) = 1;
1262+ break;
1263+ catch
1264+ fprintf('\tRetrying %d/%d\n', iRetry, nRetry);
1265+ if iRetry==nRetry
1266+ fprintf(2, '\n\tDownload failed. Check internet connection.\n');
1267+ end
1268+ end
12601269 end
12611270end %for
12621271end %func
0 commit comments