Meaningless
load cars
a = [];
c = str2double(cars.Variables);
Mg2 = c(:,2);
h1 = c(:,4);
for s = 1:N
[w,q] = min(h1,[],'omitnan');
h1(q) = max(h1)+1;
a = [a;q];
end
mpg = Mg2(a)
end
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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]));
N =
5
|
2 | Pass |
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]));
N =
6
|
Return the largest number that is adjacent to a zero
3749 Solvers
What is the next step in Conway's Life?
639 Solvers
Flag largest magnitude swings as they occur
582 Solvers
Rotate input square matrix 90 degrees CCW without rot90
380 Solvers
525 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!