www.delorie.com/gnu/docs/octave/octave_9.html   search  
 
Buy GNU books!


GNU Octave

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Matrix Arithmetic

Octave has a convenient operator notation for performing matrix arithmetic. 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

To form the matrix product transpose (a) * a, type the command

 
octave:6> a' * a


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003