Tutorial: Introduction to MATLAB
This short tutorial will only describe a fraction of the functions available in MAT- LAB, and not all of the options available for the commands will be described. The easiest way to find more information about a command is to type help com- mandattheMATLAB prompt, and some information will be shown in the MAT- LAB window. If you typehelpwin command, a separate window will open instead.
The basic form of data in MATLAB is a matrix. Even text is stored as matrices. Starting from MATLAB 5, it is possible to create multidimensional matrices, but the standard matrix is 2 dimensional. It is also possible to create structures, by using the struct command, but everything else is looked upon asa 2 dimensional matrix. The matrices maybe either real or complex. The simplest form ofa matrix is the real 1 Ã 1 matrix, a scalar.
It is possible to use the arrow keys if you make a typing error, or wish to change (or repeat) a previous command. The up and down arrows will step through all the commands given since the MATLAB session was started. If you are looking fora special command given, and you remember the first letters (or digits) on that command line, the search is made easier by typing those letters/digits before using the arrow keys. By ending the line with a semicolon (;), it is possible to avoid a display of the result. Several commands maybe given on the same line in MATLAB. The commands are separated by commas orby semicolon (to avoid display).
It is easy to create a matrix in MATLAB. The rows of the matrix are separated either by semicolons orby pressing the enter key. The different elements are separated by either commas or spaces. Note that it is straight brackets that enclose a matrix.
Source: www.nd.edu
Related PDF Files
Topic:
Comments for Tutorial: Introduction to MATLAB