# Direction Field in MatLab

I need to plot the direction field and phase plane of the following ODE using matlab. I've tried using meshgrid w/ the quiver function, however, I'm not getting the correct field.

I need to plot

$$\frac{dy}{dx}=$$ $$\frac{y(1.98x-1)}{0.5-x(1.98y+0.5)}$$

• Is this a question about mathematics or programming? The latter you should better ask on stackoverflow. In both cases the code, the plot and an explanation of what is wrong about it or why you think it is wrong should be added. – LutzL Mar 8 at 7:36
• Disregarding the directions, it should give an impression like this Wolfram Alpha stream plot – LutzL Mar 8 at 7:47
• OP: By using $\frac{\mathrm{d}y}{\mathrm{d}x}= \frac{\mathrm{d}y}{\mathrm{d}t} \div \frac{\mathrm{d}x}{\mathrm{d}t}$, you can rewrite the expression as: $x'=0.5-x(1.98y+0.5)$ and $y'=y(1.95x-1)$, where the derivative is with respect to say, $t$. Then you can reuse the matlab code found educ.jmu.edu/~strawbem/Phase_how_to.pdf – Winter Soldier Mar 23 at 17:45