function NMOCC = myfindoccur(THIS,EQTN,REQUEST)
% myfindoccur  [Not a public function] Find occurences of current dates of
% variables and shocks in an equation.
%
% Backed IRIS function.
% No help provided.

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

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

tzero = 1 - THIS.mint;
switch REQUEST
    case 'variables'
        occur = THIS.occur(EQTN,:,tzero);
        occur(THIS.nametype ~= 1) = false;
        NMOCC = find(occur);
    case 'shocks'
        occur = THIS.occur(EQTN,:,tzero);
        occur(THIS.nametype ~= 3) = false;
        NMOCC = find(occur);
end

end
