title: Resampling of two data sets of different length in MATLAB
body: <p>I have two vectors: sensorA of length 927 and sensorB of length 1250. I would like to make them of the same length. The resample() function in MATLAB is very noisy at the edges and I need atleast reasonably good accuracy throughout. </p>
  
  <p>I understand that resampling can be done by interpolation, but how do I implement it in the most efficient way. I need to stretch 927 to 1250 as uniformly as possible. </p>
  
  <p>I was wondering if I could do something like this: </p>
  
  <ol>
  <li>I need 333 new samples in the shorter vector. So for every 3 values, I insert the average (midpoint) of two consecutive values in between then. => 309 samples inserted</li>
  <li>For the remaining I insert again for every 38 samples (927/(333-309))</li>
  </ol>
  
  <p>Does this make sense? I still won't be able to get an exact interpolation. Is there any other function that I could use? (besides <code>interp()</code> because it requires an integral resampling rate?)</p>