Additional MATLAB packages for Math 222 assignments

There are two ways to do the assignment. The first uses MATLAB:

Both MATLAB assignments use a piece of software called Phase Plane with GUI for 1st and 2nd order ODE. (We will look at a first order ODE in Assignment 1 and a second order ODE in Assignment 2.) It can be downloaded here.

Note that in the past we used a program called dfield. That program is no longer actively maintained and may not work with current versions of MATLAB on all operating systems. If you already have a copy that works for you, go ahead and use it.

To use it:

  1. Download the program and save it somewhere on your computer.
  2. Start up MATLAB.
  3. Make sure that MATLAB is opened to the folder where the software is saved. Screen Shot
  4. At the >> prompt, type "pplane1" (Assignment 1) or "pplane2" (Assignment2).
  5. In the window that pops up, enter the equation and change the parameters as needed to make things look good. Click on the "Graph Phase Plane" button.
  6. Click on the graphics window that pops up in a few places, until you get a reasonable idea of what the trajectories look like. You will see the trajectories with t>0t>0 in blue and the parts with t<0t<0 in red.
  7. Click "File \to Save As" and export the image to a JPG or PNG file to print out and turn in. Never use a screenshot in anything you turn in or write!

The second way is to use the Java version of dfield
This is a freestanding program that doesn't require MATLAB. It's nicer than the MATLAB program above, because it allows you to define parameters that you can vary from within the GUI.

To use it you need to have a Java Runtime Environment (JRE) installed on your computer.

  1. Download it from here.
  2. Double click on the file dfield.jar. Your JRE should open it.
  3. Note that it allows you to change parameters right in the window. In this example, there are parameters a and b.
    dfield JRE screenshot
  4. You can print the solution to a PDF from the file menu in the graphics window.