MATLAB: Phase between two waveforms

phasewaveforms

I'm trying to figure out the phase difference between two waveforms I downloaded from an oscilloscope. They are 1X2500 matricies. Here's the code I'm using (w1 and w2 are two waveforms I got from the oscilloscope with the getWaveform command)
CosTheta = dot(w1,w2)/(norm(w1)*norm(w2));
ThetaInDegrees = acosd(CosTheta)
This only gives me the absolute value of the phase. I don't know if it's negative or positive. How could I get this answer?
Thanks!

Best Answer

The sign of the phase depends on the waveform you use as the reference. The xcorr function could help you decide that.
EDIT (15 Jul 2016 16:15 UTC)
They appear to be slightly different frequencies. They will never have a constant phase relationship.