Numerical Methods & .m FilesIn order to useMatlabroutines for the Euler, Improved Euler or Runge-KuttaMethods, you will need the fileseul.m, rk2.morrk4.m, respectively. These files arealready present on all ITaP machines as standard software. (If using your own copy ofMatlabyou may need to download these files fromhttp://math.rice.edu/∼dfield)You may also access these files from Matlab 7 via theCitrix 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 yourMatlab. Here is one way. AfterMatlabhas been opened,pull down theFilemenu and select “New M-File”. A window willpop up for you to create your function file. For example, to create afunction file for the functionf(x, y) = 6x3-e2y+√xy, 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 filewith the SAME name as your function.The above example would be saved as “
This is the end of the preview.
access the rest of the document.