MATLAB Lesson 5 - Plotting

Estimated time required:

30 minutes

Recap

You have learnt about creating vectors and vector arithmetic. Vectors often contain sets of data or approximations to functions, which only make sense when plotted.

 

Plotting

Large arrays (vector or matrices) are difficult to understand if you just look at the elements. No one can make sense of a thousand numbers dumped to the screen. However these numbers can frequently be interpreted if they are plotted. This module covers basic two dimensional plots, while more advance three-dimensional plots and movies can also be created in MATLAB.

Plotting is an essential tool to understanding and interpreting the numerical results produced by a MATLAB program and is also useful when debugging (finding errors in) your program.

Objectives

The aim of this module is to understand how to create basic two dimensional plots in MATLAB.

What you should know by the end of this module:

Instructions

Work your way through the pages of this lesson using the links in the blue bar above or at the bottom of each page. You should do them in order initially but you can return to any of them when you need to refresh your memory. You can print the pages by using the printable copy icon in the Resources menu bar to the right.

Hint: Have both these lessons open in a web browser and MATLAB open in another window so you can try all the examples as you work through the lessons.

It is recommended that you attempt the self-test exercises that you will find on each page. There is a quiz at the end of the module for which you will receive a grade.  You final mark for this quiz will be the highest mark you achieve before the due date for the quiz.

For further information on the topics covered in this module, read section 2.5 of the Introduction to MATLAB notes.