function C = intersect_noC(A,B)
% INTERSECT Compute C = { x : x in A and x in B }
% C = intersect(A,B)

% This is significantly faster than the built-in intersect
% /usr/sww/pkg/matlab-5.2/toolbox/matlab/ops/intersect.m     

if isempty(A) | isempty(B)
  C = [];
  return;
end

A = A(:);
B = B(:);

C = [];
for i=1:length(A)
  if ~isempty(find(A(i)==B))
    C = [C A(i)];
  end
end

