How to make a vector shorter ?

3 次查看(过去 30 天)
Hey everyone i have a simple problem but i cant find a proper solution.
let's say i have a vector of numbers a = [1,5,2,3,4,7,10,9]
what i want to do is: i want to find the maximum of the values in the vector (i know how to do that) but then i want to delete the maximum value from the vector to make it shorter
can someone tell me how to do it ?

采纳的回答

madhan ravi
madhan ravi 2018-12-1
a = [1,5,2,3,4,7,10,9]
[value,index]=max(a)
a(index)=[]
  4 个评论
Vincent Sin
Vincent Sin 2018-12-1
already did thank you again!!!!!!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by