-
2 Comments
Hos Rah
on 31 Aug 2023
Can someone explain the code!!!?
Christian Schröder
on 31 Aug 2023
@Hos Rah It's using a cheat to reduce the solution size to 10, something that is frowned upon in Cody. The actual code is the middle part:
load cars.mat
mpg=head(sortrows(cars,"Weight","ascend"),N).MPG
For information on how and why this cheat works, take a look at the documentation page for regexp(), specifically the section "Dynamic Regular Expressions".
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!