MATLAB: Finding difference between two curves

averaging curvesimporting excel datasubtracting curves

I am very very new to matlab. I need to find the average of two curves and then subtract it from the third. The problem is that although they have the same limits they do not have the same x-values.

Best Answer

y1=rand(1,10);
y2=rand(1,12);
y3=rand(1,15);
out=y3-mean([y1 y2])