Text-only Table of Contents (frame/ no frame)
(7) Matrix Operations Previous Top Next

 Matrix Operations


Try:
>> a=[2 4; 6 8] +10
a  =
          12     14
          16      18
>>  b = [2 4; 6 8] * 3
b =
            6      12
           18      24


Try:
>> c = [1 2; 3 4]
c =
            1      2
            3      4

>> cc = [ c c]
cc =
            1      2       1        2
            3      4       3        4

Try:
>>  a=[2 4; 6 8];
>>  b = [ 1 3; 5 7];
>> c= a+b
c   =          
                    3      7
                   11     15
>> d = a*b
d    =  
                   22     34
                   46     74


>> e = a.*b
e   =  
                   2     12
                  30     56


>> f = a^2
f       =
                  28     40
                  60     80


>> g= a.^2
g        =
                   4     16
                  36     64





Previous Top Next


Matrix_Operations.src  last modified Jan 27, 2014 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College