Text-only
Table of Contents (
frame
/
no frame
)
(7) Matrix Operations
Matrix Operations
Scalar (add, subt,mult,divide)
scalar's size is increased to match the matrix
Matrix Concatenation
Binary (add,subt,mult,divide, raise to power, transpose)
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
Matrix_Operations.src last modified Jan 27, 2014
Introduction
Table of Contents
(
frame
/
no frame
)
Printable
(single file)
© Dartmouth College