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)
Convert a numerical matrix into a cell array of strings
Reindex a vector
Given a matrix, swap the 2nd & 3rd columns
Integer Sequence - II : New Fibonacci
Elements with highest local average
Generate Square Wave
BLOCK x3 (Version 2)
birthday on same day of week
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