title: Point of Intersection in MATLAB
body: <p>How can I </p>
  
  <ul>
  <li>plot the point intersection of two curves in MATLAB?</li>
  <li>And obtain that point in its mathematical form programmatically?</li>
  </ul>
  
  <p>For simplicity I have taken two very basic curves :</p>
  
  <ul>
  <li>y=x</li>
  <li>y= cos(x)</li>
  </ul>
  
  <p>I am able to plot the curves but cannot obtain the intersection point. See the screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/9ZDVW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ZDVW.png" alt="enter image description here"></a></p>
  
  <p>I have tried the solutions proposed in <a href="https://stackoverflow.com/questions/16384516/show-the-intersection-of-two-curves#">this</a> question but none of them worked for me.</p>