I have two sets of x,y data. The plot of those data can be seen in figure below:
Let say, if the blue line is the reference, how can I calculate the distance between the blue line and the red line? To make it clearer, if the red line is behind the blue line, the difference will be negative and vice versa.
I've tried using pdist, but I think this is not the solution I want.
Any help will be really appreciated. Thank you