Hi,

I need to convert the following MATLAB function into C++. I ad have some info on using the Matlab engine but I still can understand what it is doing....

function [Is] = ver_eq(I)
l = length(I); Is = [];
if l > 1,
for i=1:l-1,
aux = I(i);
auxI = I(i+1:end);
el = find(auxI == aux, 1);
if isempty(el),
Is = [Is,aux];
end;
end;
Is = [Is,I(end)];
else
Is = I;
end;