title: Averaging many curves with different x and y values
body: <p>I have several curves that contain many data points. The x-axis is time and let's say I have n curves with data points corresponding to times on the x-axis. </p>
  
  <p>Is there a way to get an "average" of the n curves, despite the fact that the data points are located at different x-points?</p>
  
  <p>I was thinking maybe something like using a histogram to bin the values, but I am not sure which code to start with that could accomplish something like this.</p>
  
  <p>Can Excel or MATLAB do this?</p>
  
  <p>I would also like to plot the standard deviation of the averaged curve.</p>
  
  <p>One concern is: The distribution amongst the x-values is not uniform. There are many more values closer to t=0, but at t=5 (for example), the frequency of data points is much less. </p>
  
  <p>Another concern. What happens if two values fall within 1 bin? I assume I would need the average of these values before calculating the averaged curve.</p>
  
  <p>I hope this conveys what I would like to do.</p>
  
  <p>Any ideas on what code I could use (MATLAB, EXCEL etc) to accomplish my goal?</p>