% GUIselectdata
% Select loaded data to plot
% function for the MODIS GUI
% Copyright by Jasmine S Nahorniak, Oregon State University.
% Feb 24 2000

function GUIselectdata(mins,maxs,region);

mainfig=findobj('Name','MODIS GUI');

% get the data choice (selected by user)
choice=get(findobj(mainfig,'Tag','Listbox1'),'Value');

% select same choice in size and matrix boxes
set(findobj(mainfig,'Tag','Listbox3'),'Value',choice);
set(findobj(mainfig,'Tag','Listbox4'),'Value',choice);

% display min and max in GUI
set(findobj(mainfig,'Tag','EditText1'),'String',num2str(mins(choice)));
set(findobj(mainfig,'Tag','EditText6'),'String',num2str(maxs(choice)));

% display region in map box
set(findobj(mainfig,'Tag','EditText8'),'String',num2str(region{choice}(1)));
set(findobj(mainfig,'Tag','EditText9'),'String',num2str(region{choice}(2)));
set(findobj(mainfig,'Tag','EditText10'),'String',num2str(region{choice}(3)));
set(findobj(mainfig,'Tag','EditText11'),'String',num2str(region{choice}(4)));

[mins,maxs]=GUIminmax(mins,maxs);
