Jed's Octave Assignment

From Class Wiki
Revision as of 09:46, 1 October 2010 by Jstirn (talk | contribs) (Created page with 'This is how you do simple matrix multiplication using octave. Here I multiplied a 3x3 matrix by a 3x4 matrix. octave-3.2.3.exe:8:C:\Octave\3.2.3_gcc-4.4.0\bin > a = [2,3,-4,5;…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is how you do simple matrix multiplication using octave. Here I multiplied a 3x3 matrix by a 3x4 matrix.


octave-3.2.3.exe:8:C:\Octave\3.2.3_gcc-4.4.0\bin > a = [2,3,-4,5;4,-6,9,0;9,3,4,6] a =

  2   3  -4   5
  4  -6   9   0
  9   3   4   6

octave-3.2.3.exe:9:C:\Octave\3.2.3_gcc-4.4.0\bin > b = [1,4,5;4,8,-9;-82,6,0;] b =

   1    4    5
   4    8   -9
 -82    6    0

octave-3.2.3.exe:10:C:\Octave\3.2.3_gcc-4.4.0\bin > b*a ans =

   63    -6    52    35
  -41   -63    20   -34
 -140  -282   382  -410