title: Linear Interpolation in MATLAB
body: <p>I have two arrays the first one represents the time axis with time stamp 1 min</p>
  <pre><code>time=[0,60,60,120,180,240,300,360,420,480,540]
  </code></pre>
  <p>and the second array represents a data values as follows</p>
  <pre><code>data=[18,12,12,0,7,9,6,8,12,18,0]
  </code></pre>
  <p>what im trying to do is two things:</p>
  <p>1-I would like to fix the time axis to have 1 second time stamp</p>
  <p>2-Perform linear Interpolation as follows:</p>
  <p>for example i have</p>
  <p><a href="https://i.stack.imgur.com/nW5bw.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>and i would like to have sth like this:</p>
  <p><a href="https://i.stack.imgur.com/XaCtA.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>In case of time repetation like the repated 60 seconds the duplication should be deleted</p>