Percentage difference between two signals Apologies in advance for what I imagine is a simple question, however I can't work out how to do this. 

I have two signals of the same type but with different sensor types, the figure below will give you an idea of some of the data I've got:



I very simply want to calculate the average percentage difference between the two signals. Methods I've attempted so far have calculated outrageous results, in the order of ~200% difference. My attempt is below: 

  for i = 1:length(data)
      per(i) = abs((var1(i)-var2(i))/((var1(i)+var2(i))/2)) * 100;
  end


I believe the problem in this method is that I'm only calculating the difference between the two immediate points in question (i) and not on a grand scale of all the data. 

Any help would be greatly appreciated.
At the least you should normalize it by the length of the sequence. But what you're trying to do is a pretty standard thing. I'm not sure what percentage difference really means. What you should probably be using is something like the root mean squared error:

$$RMSE=\sqrt{\frac{1}{N}\sum_{n=0}^{N-1}(x(n)-y(n))^2}$$

where $x(n)$ and $y(n)$ are your two sequences.