Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
dpb
Posts:
9,850
Registered:
6/7/07
|
|
Re: How to delete an element from its position
Posted:
Mar 23, 2013 1:23 PM
|
|
On 3/23/2013 12:13 PM, IIT wrote: > I have a vector which is having repetitive elements, and I want to > delete the element from a particular position. > > A=[ 1 2 3 2 5] > > and I want to delete 2 from 4th position, pl help me out ...
ix=find(A==A(histc(A,[unique(A)])>1)); A(ix(1):ix(2))=[];
--
|
|
|
|