Environmental Engineering Reference
In-Depth Information
uses the notation ans ¼ in
order to indicate an answer to the given command. Sub-matrices of a matrix can be
called by using ' : ', as the following example illustrates:
As no variable is used in the command, MATLAB
®
Elements in the second line, second and third column are given in the answer.
The ' : ' without any numbers is used to indicate the entire range. In the example, the
entire first column of A is given
There are several special commands to input special types of matrices.
Vectors are multi-element matrices, for which either the number of rows or the
number of columns is 1. Row vectors with constant increment can be specified
as follows:
v is a row vector, containing all values between 2 and 5 with increment 0.5. 10
A column can easily be obtained by using the transponation operation, which in
MATLAB
is performed by the ' :
®
10 The comma in common numbers is a dot in all mathematics software products, thus also in
MATLAB
.
®
Search WWH ::




Custom Search