Introduction to MATLAB & SIMULINK: A Project Approach, Third Edition

Starting with the basic data structure of the numerical field, the most important elementary constructs and operations of MATLAB (in the author's opinion) will be presented here. Initially, MATLAB will only be used interactively. It will be shown how (numerical) calculations are carried out interactively and how the results of these calculations can be represented graphically and checked.
The elementary MATLAB operations can be divided roughly into five classes:
Arithmetic operations
Logical operations
Mathematical functions
Graphical functions
I/O operations (data transfer)
In essence, all these operations involve operations on matrices and vectors. These in turn are kept as variables which, with very few restrictions, can be defined freely in the MATLAB command interface.
The MATLAB command interface shows up at the start of MATLAB in the form shown in Fig. 1.1 or something similar. [2]
The main elements of this command interface are:
the command window,
the command-history window,
the current directory window or (hidden in this view) the workspace (variable window),
the file information window,
the icon toolbar with the choice menu for the current directory,
the shortcut toolbar, and
the start button.
The function of the individual elements will be discussed later, in the relevant sections. At present, only the command window, which displays the most important user interface during interactive operation, is of significance.
In the command window (1) MATLAB awaits the user's commands, which are to be directly interpreted and executed by MATLAB...