Since matlab has so many different ways of representing the empty set, could you test for emptiness using isempty(...) rather than isequal(, ...) ?
Test suit # 4 should not compare out =  with output of the function but rather isempty(out) !!!
This cody problem is really nice. At first, I felt difficult to solve it without for or while. After that, I reached to a solution.
[n, bin] = histc(A, unique(A));
multiple = find(n ==1);
index = find(ismember(bin, multiple));
failed for 4 test suit help me
>> A = 1;A(1)=;size(A)
Find the nearest integer
Narcissistic number ?
Find out sum of all elements of given Matrix
multiply by three
Tribute to Ramanujan
Mongean Shuffle : 2
Largest Geometric Series
self description 2.0
Elements with highest local average
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office