Problem 1988. Remove the middle element from a vector
Remove the middle element of a vector?
Example:
[1,2,3] should return 2
[1,2,3,4] should return 2
[] should return empty vector
Solution Stats
Problem Comments
-
2 Comments
Jean-Marie Sainthillier
on 18 Dec 2013
Remove or return ?
bainhome
on 22 Aug 2014
keep it or remove it? confused example.
Solution Comments
Show commentsProblem Recent Solvers91
Suggested Problems
-
Remove any row in which a NaN appears
8650 Solvers
-
Sum of diagonal of a square matrix
1590 Solvers
-
5506 Solvers
-
Matlab Basics - Assigning Variables
197 Solvers
-
Matlab Basics - Set unwanted parts of a vector to zero
249 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!