Cody

Solution 2025255

Submitted on 17 Nov 2019 at 15:53
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
x = 1000:2000; v = find_vampire(x); v_correct = [1260 1395 1435 1530 1827]; assert(isequal(v,v_correct))

y = [] a = '01' b = '02' c = '05' a = '01' b = '25' c = '04' a = '01' b = '04' c = '25' a = '01' b = '05' c = '02' a = '01' b = '04' c = '.25'

Matrix dimensions must agree. Error in find_vampire (line 10) if any(a==b)==1 & any(a==c)==2 & any(b==c)==3 Error in Test1 (line 2) v = find_vampire(x);

2   Fail
x = 1:999; v = find_vampire(x); assert(isempty(v))

y = [] a = '01' b = '2' c = '5' a = '01' b = '5' c = '2' a = '02' b = '4' c = '5' a = '02' b = '5' c = '4' a = '03' b = '5' c = '6' a = '03' b = '6' c = '5' a = '04' b = '5' c = '8' a = '04' b = '8' c = '5' a = '01' b = '01' c = '01' a = '01' b = '01' c = '1' a = '01' b = '1' c = '01' a = '01' b = '01' c = '.1' a = '012' b = '01' c = '12'

Matrix dimensions must agree. Error in find_vampire (line 10) if any(a==b)==1 & any(a==c)==2 & any(b==c)==3 Error in Test2 (line 2) v = find_vampire(x);

3   Fail
x = reshape(2000:2999,100,[]); v = find_vampire(x); v_correct = 2187; assert(isequal(v,v_correct))

y = [] a = '02' b = '25' c = '08' a = '02' b = '04' c = '05' a = '02' b = '05' c = '04' a = '02' b = '08' c = '25' a = '02' b = '256' c = '.23'

Matrix dimensions must agree. Error in find_vampire (line 10) if any(a==b)==1 & any(a==c)==2 & any(b==c)==3 Error in Test3 (line 2) v = find_vampire(x);

4   Pass
x = []; v = find_vampire(x); assert(isempty(v))

y = []

5   Pass
x = -2000:-1000; v = find_vampire(x); assert(isempty(v))

y = []

6   Fail
x = 125000:125501; v = find_vampire(x); v_correct = [125248 125433 125460 125500]; assert(isequal(v,v_correct))

y = [] a = '0125' b = '02' c = '256'

Matrix dimensions must agree. Error in find_vampire (line 10) if any(a==b)==1 & any(a==c)==2 & any(b==c)==3 Error in Test6 (line 2) v = find_vampire(x);