Cody

Solution 1883496

Submitted on 25 Jul 2019
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
xl = 1; xu = 10 y_correct = 1; assert(isequal(pandigital_nb(xl,xu),y_correct))

xu = 10 ans = 0

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test1 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

2   Fail
xl = 10; xu = 99; y_correct = 2; assert(isequal(pandigital_nb(xl,xu),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test2 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

3   Fail
xl = 100; xu = 999; y_correct = 6; assert(isequal(pandigital_nb(xl,xu),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test3 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

4   Fail
xl = 1000; xu = 9999; y_correct = 24; assert(isequal(pandigital_nb(xl,xu),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test4 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

5   Fail
xl = 10000; xu = 99999; y_correct = 120; assert(isequal(pandigital_nb(xl,xu),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test5 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

6   Fail
xl = 1; xu = 999; y_correct = 9; assert(isequal(pandigital_nb(xl,xu),y_correct))

ans = 0

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test6 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

7   Fail
xl = 1; xu = 9999; y_correct = 33; assert(isequal(pandigital_nb(xl,xu),y_correct))

ans = 0

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test7 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

8   Fail
xl = 100000; xu = 999999; y_correct = 720; assert(isequal(pandigital_nb(xl,xu),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in pandigital_nb (line 5) ans+sum(c>s && c<t) Error in Test8 (line 4) assert(isequal(pandigital_nb(xl,xu),y_correct))

Suggested Problems

More from this Author45