Deborah Johnson - MATLAB Cody - MATLAB Central

Deborah Johnson

28844
Rank
2
Badges
150
Score
1 – 16 of 16

Deborah Johnson submitted a Comment to Problem 44952. Find MPG of Lightest Cars

I am having the same issue as 'FB' below. However, I used the code given under Test1 to load the cars.mat. The code is below. My code passes the 1st test but not the 2nd test. Can someone please assist me. function MPG = sort_cars(N) load(fullfile(matlabroot, 'toolbox/stats/statsdemos', 'carbig.mat')); Model = strtrim(string(Model)); cars = table(Model, MPG, Horsepower, Weight, Acceleration); save cars.mat cars sorted = sortrows(cars,4); MPG = sorted(1:N,2) MPG = MPG{:,:} end N=25

on 25 Aug 2021

Deborah Johnson received Solver badge for Solution 6418844

on 24 Aug 2021

1 – 16 of 16
Go to top of page