Practical 5

Function and Script M-files

  • Understand the purpose of function M-files
  • Be able to create a function M-file
  • Be able to use commands that operate on functions, such as fzero and fplot.
  • Create function files from some provided code.

     

     

    Working through this Practical

    Go through this practical at your own pace and learn about the MATLAB environment in more detail.

    • The exercises are indented and on separate pages with shaded areas. Do these!
    • Ask your MATLAB eTutor if you have any questions or need advice using the Practical's Forum
    • MATLAB code will always be denoted by the Courier font.
    • An arrow > at the start of the line in an exercise indicates an activity for you to complete.
    • Use the arrows on the top right and bottom right of this display to move between pages, or select a page using the left hand navigation pane.
    • You can also print this resource as a single document (using the print icon in 1.9 or the Admin section in 2.5/2.6).

    Please submit your responses to the activities within this practical for formative feedback from your MATLAB eTutor. This word document template can be used to prepare your responses for submission.