Jed's Octave Assignment: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
(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;…')
 
No edit summary
Line 1: Line 1:
This is how you do simple matrix multiplication using octave. Here I multiplied a 3x3 matrix by a 3x4 matrix.
. Here I used octave to multiply 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]
a =
a =
Line 10: Line 10:
9 3 4 6
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;]
b =
b =
Line 18: Line 18:
-82 6 0
-82 6 0


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

Revision as of 10:51, 1 October 2010

. Here I used octave to multiply a 3x3 matrix by a 3x4 matrix.


> 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


> b = [1,4,5;4,8,-9;-82,6,0;] b =

   1    4    5
   4    8   -9
 -82    6    0

> b*a ans =

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