Cody

Solution 2462759

Submitted on 3 Jun 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
N = 5 load(fullfile(matlabroot, 'toolbox/stats/statsdemos', 'carbig.mat')); Model = strtrim(string(Model)); cars = table(Model, MPG, Horsepower, Weight, Acceleration); save cars.mat cars assert(isequal(sort_cars(N),[35; 31; 39.1; 35.1; 31]));

Error in solution: Line: 2 Column: 29 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
N = 6 load(fullfile(matlabroot, 'toolbox/stats/statsdemos', 'carsmall.mat')); Model = strtrim(string(Model)); cars = table(Model, MPG, Horsepower, Weight, Acceleration); save cars.mat cars assert(isequal(sort_cars(N),[33; 29.5; 26; 29; 38; 32]));

Error in solution: Line: 2 Column: 29 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Suggested Problems

More from this Author13