MATLAB: How to make a vector shorter

vectors

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 ?

Best Answer

a = [1,5,2,3,4,7,10,9]
[value,index]=max(a)
a(index)=[]