fname = getAlphaDatabaseName(mjd) Return the full path of the file name for the alpha database file which contains the date correponding to mjd (mjd is a float). If mjd is an array of floats, then this returns a cell array of file names which cover the dates in mjd. OGK, 19 November 2012
0001 function fname = getAlphaDatabaseName(mjd) 0002 % fname = getAlphaDatabaseName(mjd) 0003 % 0004 % Return the full path of the file name for the alpha database file which 0005 % contains the date correponding to mjd (mjd is a float). If mjd is an 0006 % array of floats, then this returns a cell array of file names which cover 0007 % the dates in mjd. 0008 % 0009 % OGK, 19 November 2012 0010 % 0011 0012 [home,installeddir]=where_am_i(); 0013 [y, m, d, hr, min, sec] = mjd2date(mjd); 0014 0015 % how many different files are there? 0016 entries = sort(unique(y+m/100)); 0017 fname = cell(length(entries),1); 0018 for k=1:length(entries) 0019 yi = floor(entries(k)); 0020 mi = round((entries(k)-yi)*100); 0021 fname{k} = [home,'/',installeddir,sprintf('/constants/alphaDatabase_%04d_%02d.txt',yi,mi)]; 0022 end 0023 0024 0025 end