MATLAB: Delete array element values from another array element values delete array from another array Hi Everyone, Suppose I have the following A = [1 2 3] and Z = [1 2 3 4 5 6] how do I remove the values of A from Z, to get Z = [4 5 6] in matlab Regards,Chandradhar Savanth Best Answer setdiff(Z,A) Related SolutionsMATLAB: How to remove duplicate elements from array based on another array [~, ii]= unique(a, 'stable'); b = b(ii) MATLAB: Deleting values from an array setdiff replies all elements of a vector, which do not appear in a second one:R3 = setdiff(R3, smallerArray);OrR3 = R3(~ismember(R3, smallerArray)) Related QuestionAdding values in arrayDelete every second element in arrayWrite out which values are represented in an array[GIS] HDF5 and georeferencing
Best Answer