Anthony J. O’Connor School of Science, Griffith University, Brisbane, Australia
1.
What is MATLAB ?
MATLAB started as an interactive program for doing matrix calculations and has now grown to a high level mathematical language that can solve integrals and differential equations numerically and plot a wide variety of two and three dimensional graphs. In this subject you will mostly use it interactively and also create MATLAB scripts that carry out a sequence of commands. MATLAB also contains a programming language that is rather like Pascal. The first version of Matlab was produced in the mid 1970s as a teaching tool. The vastly expanded Matlab is now used for mathematical calculations and simulation in companies and government labs ranging from aerospace, car design, signal analysis through to instrument control & financial analysis. Other similar programs are Mathematica and Maple. Mathematica is somewhat better at symbolic calculations but is slower at large numerical calculations. Recent versions of Matlab also include much of the Maple symbolic calculation program.
In this lab you will cover the following basic things:
• • • • • • • •
using Matlab as a numerical calculator entering row vectors and column vectors entering matrices forming matrix and vector products doing matrix products, sums etc using Matlab to solve linear equations Matlab functions that operate on arrays Plotting basic graphs using Matlab.
Matlab introduction
‘
1
1
How to get started
When the computer has started go through the following steps in the different menus • • Look for the Network Applications folder and double click on that Within this you will see a little icon for Matlab61 – double click on that
Within about 30 seconds Matlab will open (you may get a little message box about ICA applications – just click OK on this) You should now see a screen like the picture below
This is the Matlab screen – it broken into 3