All engineers can get a MATLAB password for the Upson Macintoshes from the engineering library. People taking this course can use the
username Math293 and the password NoNumbrs
Windows 95 users have special file naming issues. Click here for some Windows_95_advice prepared by a student in the class.
dfield.m and dfsolve.m (dfield uses dfsolve. dfield shows slope fields and solutions to first order ODEs). To use these copy the first file (all of it, wait for it all to download) into a file called dfield.m. Copy (all of) the second into a file called dfsolve.m. Then read the directions at the start of dfield.m. Then execute dfield.m by typing >dfield to the MATLAB command window. These are demonstration programs. Students are intended to use them and understand the math they are demonstrating. The MATLAB code is more advanced than the average student should be able to follow.
pplane.m and ppsolve.m (pplane uses ppsolve. pplane shows the phase plane for coupled, autonomous, 1st order ODEs). To use these copy the first file (all of it, wait for it all to download) into a file called pplane.m. Copy (all of) the second into a file called ppsolve.m. Then read the directions at the start of pplane.m. Then execute pplane.m by typing >pplane to the MATLAB command window. These are demonstration programs. Students are intended to use them and understand the math they are demonstrating. The MATLAB code is more advanced than the average student should be able to follow.
Loops_n_plots.m (Loops_n_plots.m is a MATLAB script file that demonstrates the use of FOR and WHILE loops. It shows how to overlay plots using PLOT or HOLD. And it shows how to get the last element of a 'vector' using LENGTH. Some of these things may be useful for coding up Euler's method for homework 4.
systems_driver.m and systems_rhs.m. These two work together. They are a simple example of a numerical solution of a system of ODEs. systems_driver.m is a script file that uses ODE23 and SUBLPLOT to find and graph the solution to a simple system of ODEs. systems_rhs.m is a function file that gets called by ODE23 when systems_driver is run, it contains the description of the right hand sides of the system of ODEs.
matrix_alg_demo.m is a demo script file of many useful matrix commands in MATLAB.
eig_ODE_soln.m is a set of commands that shows how to use eigenvectors to solve sets of linear ODEs in MATLAB. The file corrects a mistake made in lecture (Ruina and Terrell) and in the Homework Solutions (#8 called #7) by Nagy.
Surface_plots_explained describes how to do plots of surfaces in MATLAB. The command MESHGRID is explained (sort of) and three sample plots are presented.
de solves differential equations. It is for initial value problems for up to three first-order equations using the Runge-Kutta method. There are several examples available by clicking 'Example'. To enter your own you may either edit the examples, or click 'Clear', click in this area, and type your equations. Click 'Go' to calculate and graph the results. Symbols allowed are as shown in the examples, together with sin cos print abs e pi box ^*/+-=(); If you use 'print' the results are printed in columns of t,x,y,z to system output. (Under Netscape you must use a menu option to show this output.) 'delt' is the stepsize. t0 is the time when initial conditions are applied. Defaults are x' = y' = z' = 0, t= 0 to 1, delt = 0.1, x0 = y0 = z0 = 0 at t0 = 0, and box = 2. 'box' is the approximate radius in which we graph, but the graph is redrawn to fit the space once the calculation is done. You may abbreviate box, print, and delt. When solving a system of three equations, the graph may be rotated by clicking in the viewpoint control. The java source code for this applet is available by request from the author. Also available is the C code for a unix style program (fast, text-based, io redirection, crude graphics) with about the same functionality. de was inspired by John Hubbard's MacMath, a set of educational differential equation solvers and other programs for the Macintosh. Please send comments to the author, Bob Terrell, at bterrell@math.cornell.edu
On a MAC JAVA comes with Netscape 3 (which you can download for free from Netscape).