function [data,data_info,data_n,handles] = iduigetd(type)
%IDUIGETD Gets the desired active data set
%	TYPE: 'e' The Estimation data set is returned
%	TYPE: 'v' The Validation data set is returned
%	DATA: The data
%	DATA_INFO: The corresponding information matrix
%	DATA-N: The data name
%	handles: The handles [kax,klin,kname].

%	L. Ljung 4-4-94
%	Copyright (c) 1986-95 by the MathWorks, Inc.
%	$Revision: 1.4 $  $Date: 1995/05/02 16:32:08 $

global XIDhw

if type=='e',
   hax=XIDhw(3,1);
elseif type=='v',
    hax=XIDhw(4,1);
end

hnrdat=findobj(hax,'tag','selline');
hnrstr=findobj(hax,'tag','name');
data=get(hnrdat,'UserData');
data_info=get(hnrstr,'UserData');
data_n=get(hnrstr,'String');
handles=[hax,hnrdat,hnrstr];
