{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

eu - Numerical Methods.m Files In order to use Matlab...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Numerical Methods & .m Files In order to use Matlab routines for the Euler, Improved Euler or Runge-Kutta Methods, you will need the files eul.m, rk2.m or rk4.m , respectively. These files are already present on all ITaP machines as standard software. (If using your own copy of Matlab you may need to download these files from http://math.rice.edu/ dfield ) You may also access these files from Matlab 7 via the Citrix Client : https://goremote.ics.purdue.edu/Citrix/MetaFrame/site/default.aspx You must first create a function file in the same directory (or folder) as your Matlab . Here is one way. After Matlab has been opened, pull down the File menu and select “ New M-File ”. A window will pop up for you to create your function file. For example, to create a function file for the function f ( x, y ) = 6 x 3 - e 2 y + x y , type : function W=fcn1(x,y) W=6*x 3-exp(2*y)+sqrt(x)/y; (Don’t forget the “ ; ” at the end.) Save this file as a .m file with the SAME name as your function. The above example would be saved as “
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}