title: Matlab - How to align a curve to fit its start and end points to y=0 line?
body: <p>I have set of points which resembles a curve. I created an additional line from its start to end (dashed line). Please see an example output below;</p>
  
  <p><a href="https://i.stack.imgur.com/3oeUg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3oeUg.jpg" alt="Set of points"></a></p>
  
  <p><b>Question: </b>What I would like to do is to realign this curve so that its starting point and the ending point will be on the x axis, where y=0. This means that dashed line will no longer be necessary as the x-axis will play that role.</p>