I have an array of numbers, for example a = [1 2 2 5 5 7 7] I want to detect when number are repeating (for example 2, 5, and 7) and then add .001 to the second number that was repeated to get a result of [1 2 2.001 5 5.001 7 7.001]
MATLAB: How to detect if any numbers in an array are equal
arrayMATLAB
Related Question
- How to initialize a variable to zero in userdefined matlab function, which should be executed only once then the values should change dynamically
- Is it possible to have tighter fit of Y-axis scales for the same Y-values which are small in MATLAB 7.8 (R2009a)
- How to detect the repetition of any number in a array
Best Answer