|
-
September 18th, 2011, 10:04 AM
#1
Converting MATLAB function to C++
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;
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|