function DATA = myevalident(THIS,DATA,TIME,SELECT,IALT)
% myevalident  [Not a public function] Eval identities.
%
% Backend IRIS function.
% No help provided.

% -IRIS Toolbox.
% -Copyright (c) 2007-2012 Jaromir Benes.

if isequal(TIME,Inf)
    maxlag = -THIS.mint;
    maxlead = THIS.maxt;
    nxper = size(DATA,3);
    TIME = maxlag+1 : nxper-maxlead;
else
    TIME = TIME(:).';
end

if isequal(SELECT,Inf)
    SELECT = true(size(THIS.ident));
end

%**************************************************************************

%identid = THIS.ident;
%identid = identid(~isnan(identid));
% DATA(1,identid,TIME) = NaN;
L = real(THIS.Assign(1,:,IALT));

for ieq = find(~isnan(THIS.ident) & SELECT)
    id = THIS.ident(ieq);
    DATA(1,id,TIME) = THIS.eqtnf{ieq}(DATA,TIME,L);
end

end