function clbBtnMatrixFilename

global BatchResults
global BatchResultsFile
global Selection
global ButtonBackColor

[filename, pathname, filterindex] = uigetfile( ...
       {'*.txt','txt-files (*.txt)';...
        '*.*','All files'}, ...
        'Select a result file', BatchResultsFile);

if ~filterindex
    return
end    
    
if isstr(pathname) && isstr(filename)
   BatchResultsFile = [pathname filename]; 
   h=findobj('Tag','txtMatrixFileName');
   set(h,'String',BatchResultsFile);
   BatchResults = load(BatchResultsFile);
   
   AllYears = getFromMatrixFile(BatchResults,1);
   Selection.Years=unique(AllYears);    
   AllPercentages = getFromMatrixFile(BatchResults,17);
   Percentages=unique(AllPercentages);
   Selection.Percentages = Percentages;
   Selection.Exceedances = Percentages;
   for i=1:length(Percentages)
       Selection.Exceedances(i) = 1./Percentages(i);
   end
   
   h=findobj('Tag','lstYears');
   set (h,'String',Selection.Years,'Enable','on');
   
   h=findobj('Tag','lstExceedance');
   set (h,'String',Selection.Exceedances,'Enable','on');
   
   h=findobj('Tag','lstMethod');
   set (h,'Enable','on');

   h=findobj('Tag','btnPlot');
   set (h,'Enable','on','BackgroundColor',ButtonBackColor.on);

   h=findobj('Tag','btnPlotAll');
   set (h,'Enable','on','BackgroundColor',ButtonBackColor.on);
   
end   