This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Harish Maradana
on 25 Aug 2014
function A=removeSingle(A)
[n, bin] = histc(A, unique(A));
multiple = find(n ==1);
index = find(ismember(bin, multiple));
A(index)=[];
end
failed for 4 test suit help me
Binbin Qi
on 27 Oct 2014
>> A = 1;A(1)=[];size(A)
ans =
1 0
>> size([])
ans =
0 0
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!