Next: Solving Systems of Linear Equations, Previous: Creating a Matrix, Up: Simple Examples [Contents][Index]
Octave uses standard mathematical notation with the advantage over
low-level languages that operators may act on scalars, vector, matrices,
or N-dimensional arrays. For example, to multiply the matrix A
by a scalar value, type the command
octave:4> 2 * A
To multiply the two matrices A
and B
, type the command
octave:5> A * B
and to form the matrix product
transpose (A) * A
,
type the command
octave:6> A' * A