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) ; Related SolutionsMATLAB: Removing repeated values entirely from a vector One approach:V = [1 1 2 3 4 4 5];[Vu,~,ic] = unique(V);T = accumarray(ic, 1);Out = Vu(T == 1)Out = 2 3 5 MATLAB: How to remove duplicate elements from array based on another array [~, ii]= unique(a, 'stable'); b = b(ii) Related QuestionOption ‘stable’ of the command uniqueExtracting elements from a/an vector/array with a specific orderMatrix operationChanging order of elements of one vector depending on the order of another vectorRemove duplicate values in matrixHowto replace Element with Element from another Vector at the 1st Element’s PositionHow to sort the elements of an array within a given range
Best Answer