This preview shows page 1. Sign up to view the full content.
In order to use Matlab routines for the Euler, Improved Euler or Runge-Kutta Methods, you will need the ﬁles eul.m, rk2.m or rk4.m , respectively. These ﬁles are already present on all ITaP machines as standard software. (If using your own copy of Matlab you may need to download these ﬁles from http://math.rice.edu/ ∼ dﬁeld ) You may also access these ﬁles from Matlab 7 via the Citrix Client : https://goremote.ics.purdue.edu/Citrix/MetaFrame/site/default.aspx • You must ﬁrst create a function ﬁle 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 ﬁle. For example, to create a function ﬁle 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 ﬁle as a .m ﬁle with the SAME name as your function. The above example would be saved as “
This is the end of the preview. Sign up to access the rest of the document.
This note was uploaded on 01/18/2012 for the course MATH 366 taught by Professor Edraygoins during the Fall '09 term at Purdue University-West Lafayette.
- Fall '09