Cody

# Problem 1162. Happy 2013...

Solution 2266733

Submitted on 9 May 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
start=1000; finish=1023; y_correct = 1; assert(isequal(diff_digits(start,finish),y_correct))

Matrix dimensions must agree. Error in diff_digits (line 4) if unique(num2str(i))==num2str(i) Error in Test1 (line 2) assert(isequal(diff_digits(start,finish),y_correct))

2   Fail
start=1000; finish=9999; y_correct = 4536; assert(isequal(diff_digits(start,finish),y_correct))

Matrix dimensions must agree. Error in diff_digits (line 4) if unique(num2str(i))==num2str(i) Error in Test2 (line 2) assert(isequal(diff_digits(start,finish),y_correct))

3   Fail
start=1234; finish=5678; y_correct = 2273; assert(isequal(diff_digits(start,finish),y_correct))

Matrix dimensions must agree. Error in diff_digits (line 4) if unique(num2str(i))==num2str(i) Error in Test3 (line 2) assert(isequal(diff_digits(start,finish),y_correct))

4   Fail
assert(isequal(diff_digits(4321,6789),1210))

Matrix dimensions must agree. Error in diff_digits (line 4) if unique(num2str(i))==num2str(i) Error in Test4 (line 1) assert(isequal(diff_digits(4321,6789),1210))

5   Fail
assert(isequal(diff_digits(1988,2012),0))

Matrix dimensions must agree. Error in diff_digits (line 4) if unique(num2str(i))==num2str(i) Error in Test5 (line 1) assert(isequal(diff_digits(1988,2012),0))