Hi,
I have a matrix like the one below and i need to get the mean distance between each 3, each 2 etc…
I tried to use several diastance function (like pdist etc) but none of these give an exploitable result (or maybe i misunderstood how its work).
Thank you for your help.
n=randi(3,10)n = 1 2 3 2 1 1 2 1 3 1 2 1 3 2 1 3 1 1 2 3 3 3 2 3 2 2 2 3 2 3 1 1 2 2 1 1 3 1 1 3 1 3 2 2 3 3 1 3 2 1 1 1 1 3 1 3 1 3 2 1 2 2 2 3 1 2 1 2 3 2 3 2 2 2 1 1 1 2 2 3 2 3 3 2 1 1 2 1 2 1 2 1 3 2 2 2 2 2 3 1
Best Answer