I have multiple test data which is arranged in a matrix like 'A'. Column 1 = x-axis, column 2 = y-axis.
In order to interpolate I need to delete duplicate x-values. There is some insignificant variations in the corresponding y-values, hence it doesn't matter if it's the first or last that is kept.
Below is an example of the method i've tried. It deletes the rows where both columns are identical, but leaves the ones with different y-values
A = randi(5,10,2)A = 10×24 33 15 24 15 23 32 31 34 54 3B = unique(A,"rows","sorted")B = 8×21 32 33 13 34 14 34 55 2
Is there a way to get matlab to use the first column for comparrison only, and delete the entire row?