MATLAB Project: Getting Started with MATLAB Name_______________________________
Purpose: To learn to create matrices and use various MATLAB commands for reference later
MATLAB functions used: [ ] : ; + – * ^ , size, help, format, eye, zeros, ones, diag,
rand, round, cos, sin, plot, axis, grid, hold, path;
will write [Enter] to mean press that key, but we will omit this “carriage return” prompt later.) After
you execute each line, study the result to be sure it is what you expect, and take notes. After trying the
examples in each section, do the exercises.
If you do not complete this tutorial in one session, the variables you created will be erased when
you exit MATLAB. See the remark before Section 6 to find out how to get them back quickly the next
time you continue work on this project.
Sections: 1. Creating matrices, page 2
3. The size command, page 3
5. Accessing particular matrix entries, page 4
7. Special MATLAB functions for creating matrices: eye, zeros, ones, diag, page 5
9. Using the semicolon to suppress results, page 7
11. Matrix arithmetic, page 8
13. Plotting, page 10
15. Ways to get Laydata4 Toolbox, page 12
17. Other features of MATLAB, page 12