Problem 279. collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity and second column for mass of each car. assume momentum conservation, output final velocity. Example -- vm=[60 2; -30 4], first car velocity (+60) mph, mass 2 tons; second car velocity (-30) mph, mass 4 tons, final velocity is zero.
Solution Stats
Problem Comments
-
1 Comment
20 is the best general solution. Lower scores take advantage of the limited test suite.
Solution Comments
Show commentsProblem Recent Solvers143
Suggested Problems
-
26619 Solvers
-
Replace NaNs with the number that appears to its left in the row.
3028 Solvers
-
The Hitchhiker's Guide to MATLAB
3350 Solvers
-
Make a run-length companion vector
645 Solvers
-
Find Index of maximum Value and maximum Value of a vector
166 Solvers
More from this Author100
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!