dynare/matlab/selif.m

13 lines
188 B
Matlab
Raw Normal View History

% Copyright (C) 2001 Michel Juillard
%
function x = selif(a,b)
if size(b,2) ~= 1
error ('The second argument in SELIF must be <20> column vector') ;
end
x = a(find(b == 1),:) ;
return ;