Cody

Solution 2154746

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

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
filetext = fileread('largest.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden') assert(isempty(strfind(filetext, 'max')),'max() forbidden') assert(isempty(strfind(filetext, 'min')),'min() forbidden') assert(isempty(strfind(filetext, 'sort')),'sort() forbidden')

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

2   Fail
v = [4 7 1 6]; x_correct = 7; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

3   Fail
v = [1 1 1 1]; x_correct = 1; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

4   Fail
v = [4 3 2 1]; x_correct = 4; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

5   Fail
v = [1 2 3 4]; x_correct = 4; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

6   Fail
v = [1 1 3 5]; x_correct = 5; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

7   Fail
v = [3 3 2 4]; x_correct = 4; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

8   Fail
v = [2 3 1 6]; x_correct = 6; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

9   Fail
v = [3 3 3 9]; x_correct = 9; assert(isequal(largest(v),x_correct))

Error in solution: Line: 2 Column: 1 At least one END is missing: the statement may begin here.

Suggested Problems

More from this Author25