Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, as well as elements 5-7 and places them in a vector y in reverse order, for example:
x = [1 2 3 4 5 6 7] --> y = [5 6 7 2]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers269
Suggested Problems
-
Select every other element of a vector
36275 Solvers
-
Getting the indices from a vector
11835 Solvers
-
632 Solvers
-
1717 Solvers
-
Replace every 3rd element in a vector with 4
265 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!