title: Vector field in matlab
body: <p>I am trying to solve this particular problem in matlab</p>
  
  <p>"Consider the system
  dr/dt = r*(l - r^2 ) + mu*r cos (theta)</p>
  
  <p>d(theta)/dt = 1</p>
  
  <p>When mu = o , there's a stable limit cycle at r =1 , 
  Show that a closed orbit still exists for ,mu > 0, as long as mu is sufficiently small."</p>
  
  <p>i am able to draw a close limit cycle, but unable to draw vector field for x vs y graph.</p>
  
  <p>here is my code..</p>
  
  <pre><code>function file-&gt;
  function dy = tst(t,y)
  %UNTITLED Summary of this function goes here
  % Detailed explanation goes here
  dy = zeros(2,1);
  dy(1) = y(1)*(1-y(1)*y(1))+1.5*y(1)*cos(y(2));
  dy(2) = 1;
  end
  
  script file-&gt;
  
  [t,r] = ode45(@tst,[0, 40],[1,0]);
  x = r(:,1).*cos(r(:,2)); 
  y = r(:,1).*sin(r(:,2));
  figure(1)
  plot(x,y);
  
  hold on
  
  [R,T] = meshgrid(r(:,1),r(:,2));
  
  X = R.*cos(T);
  
  Y = R.*sin(T);
  
  quiver(R,T,X,Y);
  </code></pre>
  
  <p>I thing i am doing this in wrong way, what is the correct way to draw vector field??
  the problem is in script file.</p>