Exactly what is Waveform 1 and waveform 2? If you plotted them in an axes, you know the x and y signals. For example
subplot(2, 2, 1);
subplot(2, 2, 2);
subplot(2, 2, 3);
Or maybe you want to use interp1() to sample y2 at the locations of elements of x1?