I've got two different sets of data. Each set of data is a two dimensional matrix, filled with real values. What I want to do is measure how well these sets of data correlate (so that a perfect fit would have a value of zero). For example, if the two sets of data, when plotted, are each very far apart from each other - this should be not very well correlated, and have a large value associated with it. However, if the data sets are similarly shaped and positioned very similarly, the 'correlation value' should be small.
The catch is that these data sets don't have matching x or y columns - in fact, each data set has a different number of elements. I was going to use the least squares method but then realized that this wouldn't work that easily in this case.
Are there any well known or documented techniques for doing this? If not, any ideas how I might be able to achieve this?