Q:

How do you line-up matching (x,y) coordinates in Matlab?

I have two color map images and I want to find the difference between the colors at each coordinate.  I have the data for the maps in an Excel file, which is formatted so that column A is the x coordinates, column B is the y coordinates, and C is linear retardance (my color data) at the respective (x,y).  I would like to simply represent the two data tables as matrices and then get the difference between the two C columns and then map out these points, but the problem I have is that the x and y values are different for the two maps; for example, if I have the points (2,1),(2,2),(2,3), and (2,4) for one color map, I have the points (2,-1),(2,0.5),(2,1) and (2,2) for another.  It ends up so that one map has about 8300 rows of coordinates and the other has 7500 rows of coordinates.  I cannot match up the matrices if I do not have the same dimensions so I was wondering if there would be a function for Matlab that would only take into consideration equivalent coordinates to get the differences for column C.

A:

Once you get it into a matirx (this should be relatively easy), the easy way is to use imresize, otherwise the hard way is to use interp2 to stretch or condense the values to the size of the other one. Then just use subtraction to get the difference between the matrices 

