MATLAB: How to delete an element from a particular position from a vector of repetitive elements

arraymatrixvector

I want to delete the element from a particular position in the vector as I have repetitive elements in that vector.
For example, I have
A =[1 2 3 2 5];
and I want to delete 2 from 4th position. Help me out

Best Answer

You might just want to use UNIQUE..
>> b = unique(A) ;