Cody

Solution 2435211

Submitted on 31 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
filetext = fileread('bubbles.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')

Error in solution: Line: 3 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

2   Fail
v = [1 3 0 5 0 -1]'; w_correct = [0 0 1 3 5 -1]'; assert(isequal(bubbles(v),w_correct))

Error in solution: Line: 3 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

3   Fail
v = [0 0 9 2 6]'; w_correct = v; assert(isequal(bubbles(v),w_correct))

Error in solution: Line: 3 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

4   Fail
v = [1 3 5 -1]'; w_correct = v; assert(isequal(bubbles(v),w_correct))

Error in solution: Line: 3 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

5   Fail
v = [0 1 0 1 1 1 0]'; w_correct = [0 0 0 1 1 1 1]'; assert(isequal(bubbles(v),w_correct))

Error in solution: Line: 3 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.