[programming] language fixes in chapter and exercises
This commit is contained in:
@@ -254,7 +254,7 @@ type (figure~\ref{vectorfig} B). The variable \varcode{test} in
|
||||
\begin{figure}[ht]
|
||||
\includegraphics[width=0.8\columnwidth]{scalarArray}
|
||||
\titlecaption{Scalars and vectors.}{\textbf{A)} A scalar variable
|
||||
holds exactly on value. \textbf{B)} A vector can hold multiple
|
||||
holds exactly one value. \textbf{B)} A vector can hold multiple
|
||||
values. These must be of the same data type (e.g. integer
|
||||
numbers). \matlab{} distinguishes between row- and
|
||||
column-vectors.}\label{vectorfig}
|
||||
@@ -646,7 +646,7 @@ and should be always preferred over \code{length()}.
|
||||
|
||||
Analogous to the data access in vectors we can address individual
|
||||
elements of a matrix by it's index. Similar to a coordinate system
|
||||
each element is addressed using a n-tuple with $n$ the number of
|
||||
each element is addressed using an n-tuple with $n$ the number of
|
||||
dimensions (figure~\ref{matrixindexingfig},
|
||||
listing~\ref{matrixIndexing}). This type of indexing is called
|
||||
\codeterm{subscript indexing}. The first coordinate refers always to
|
||||
@@ -910,10 +910,10 @@ this can save processing time.
|
||||
|
||||
Previously we have introduced the data types for integer or floating
|
||||
point numbers and discussed that there are instances in which it is
|
||||
more efficient to use a integer data type rather than storing floating
|
||||
more efficient to use an integer data type rather than storing floating
|
||||
point numbers. The result of a Boolean expression can only assume two
|
||||
values (true or false). This implies that we need only a single bit to
|
||||
store this information as a 0 (false) and 1 (true). \matlab{} knows a
|
||||
store this information as 0 (false) or 1 (true). \matlab{} knows a
|
||||
special data type (\codeterm{logical}) to store the result of a
|
||||
Boolean expression. Every variable can be evaluated to true or false
|
||||
by converting it to the logical data type. When doing so \matlab{}
|
||||
|
||||
Reference in New Issue
Block a user