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)
Maximum running product for a string of numbers
Find the palindrome
Increment a number, given its digits
Back to basics 20 - singleton dimensions
Detect a number and replace with two NaN's
Let's see how peculiar we can get
possible ways through matrix
Generate Square Wave
I want eval
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