Signal compare - cross corelation in frequency domain matlab I need compare two signals. Signals have simliar shapes but completely different values (as on picture):



So I think cross corelation in frequency domain should gave me a number that shows me how the signals are similar. But I have no idea how to do that in matlab. 

Where I can find code to do it?
Yes, cross-correlation will provide some information on the similarity of the two waveforms. See the function reference for xcorr. Look into proper normalization so that the result is between something like 0 and 1 or -1 and 1. As a matter of fact, this is pretty well discussed in another stackexchange question.

As for frequency domain cross-correlation, I don't think that's what you want to do. Doing time-domain cross-correlation results in multiplication in the frequency domain, so you're looking to maximize the total energy in F(x)*F(y), where F(x) is the FFT of x.