Comparing two plots

I have a program that randomly generates line plots and what I would like to do now is compare two of those line plots and get a measure of 'similarity' between them. Now I feel as if this measure of similarity is relative to other measures I'm taking; correct me if I'm wrong. So is there any theorem/algorithm that can do this? If not, any that will get me closer to what I want?

-
I'm a bit dense, I'm sorry. What is a line plot? –  mixedmath Jul 28 '11 at 18:47
For example, my graphs have time on the x-axis and speed of an object on y-axis. What I'm looking to do is get a sense of how similar they are to each other. –  Ram Jul 28 '11 at 18:51
If the x-coordinates of both sets match, just take the sum of squares of differences of corresponding y-coordinates. The nearer to zero, the more "similar". –  Ｊ. Ｍ. Jul 28 '11 at 19:29
In that case you would create an affine model and compare the models. –  Emre Jul 28 '11 at 21:34
Hmm, after lots of sleep, I think @Emre's is a good idea. You could try fitting a (shape-preserving) interpolant to both data sets, subtract one interpolant from the other, and take the (integral) norm of that difference. –  Ｊ. Ｍ. Jul 29 '11 at 4:21