Problem 2918. Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives those numbers for any vector x
example:
x = [1 2 3 4]
output = [2 3 4]
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers260
Suggested Problems
-
29922 Solvers
-
Return the largest number that is adjacent to a zero
5508 Solvers
-
2714 Solvers
-
Back to basics 23 - Triangular matrix
1115 Solvers
-
Matrix indexing with two vectors of indices
769 Solvers
More from this Author28
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!