This solution is outdated. To rescore this solution, sign in.
-
3 Comments
Adetiloye Joseph Bamisebi
on 24 Mar 2020
I do not understand why this code failed assertion test even though it yields the correct answer
function mpg = sort_cars(N)
load cars.mat
sorted = sortrows (cars,4)
n = N
mpg = sorted(1:n,2)
end
Pooja Lalan
on 7 Apr 2020
The output is expected to be a column vector, whereas your code returns a table.
Prasad Reddy
on 28 Apr 2020
I tried for the solution nearly 20 ways but didn't work. finally took help from the Matlab community and compleated it
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!