title: how to draw a slope field in matlab
body: <p>I was looking for a way to draw slope fields in Matlab.</p>
  
  <p>Here is what I am looking for:</p>
  
  <p>I have an equation </p>
  
  <pre><code>dy/dx = f(x,y)
  </code></pre>
  
  <p>or </p>
  
  <pre><code>dx/dt = f(x,y)
  dy/dt = g(x,y)
  </code></pre>
  
  <p>and I want to draw it in a nice way</p>
  
  <p>Because the only <a href="https://stackoverflow.com/questions/7761685/how-to-get-a-vector-field-that-maps-the-slopes-of-an-equation">answer</a> about it here was not answering my question, it took me some time to find how to do this.</p>
  
  <p>Also because this is not something I am doing all the time in matlab (most probably till the next time I will need it, I will forget it) I am creating a memo for me how to do this.</p>
  
  <p>If you will find it useful, feel free to upvote</p>