Phaseplot

From MurrayWiki
Revision as of 02:04, 12 October 2008 by Merfeld (Talk | contribs)

Jump to: navigation, search

When calling the phaseplot command, be sure that you are correctly inputting the arguments. Below is a proper example of how to call phaseplot:

phaseplot('f',X1Range,X2Range, scale)

phaseplot('oscillator', [-1 1 10], [-1 1 10], 0.1)

Note that oscillator is the function that defines the derivative (look at week two and download oscillator.m if you don't know how to define the derivative function) and it is called with apostrophes:

Correct way: 'oscillator'

Incorrect ways: oscillator or @oscillator

X1Range and X2Range are of the form [min, max, num]. They define the axes of the plot and num determines how many arrows will be drawn along each corresponding axis. Make sure that the axes ranges include the equilibrium points. Scale is the final argument and it scales the arrows created on the quiver plot; 0.1 seems to be a good choice, but if your arrows are to small or too big try a different scale factor.

-- Max Merfeld