How to delete last number from a array?

556 次查看(过去 30 天)
I need, a=[8 9 5 8 7] to a=[8 9 5 8]. Every time I have to delete only last element. In my case, it will be complicated to delete like 5th element.
  2 个评论
Jordan Garcia
Jordan Garcia 2019-6-6
How do you make this possible with any size of row vector eliminating the final element for any size not just for a specific vector?
Walter Roberson
Walter Roberson 2019-6-7
Birdman's answer already does that. end always refers to the last element no matter how large that is.

请先登录,再进行评论。

采纳的回答

Birdman
Birdman 2017-11-12

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by