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)
Reverse the Words (not letters) of a String
Output any real number that is neither positive nor negative
Switch matrix to a column vector
05 - Vector Equations 1
Create a vector
Path of least resistance - Move all direction
Yet Another Path Finder
row-th maximum row elements
Graph Algorithms - 2 : Chromatic Number
Integer Sequence - II : New Fibonacci
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