EE341 EXAMPLE 2: INTERACTIVE MATRIX OPERATIONS WITH MATLAB
Matlab Commands Typed:
EDUğ diary example2.txt
EDUğ A = [1 2;3 4]
A =
1 2
3 4
EDUğ B = [5 6;7 8]
B =
5 6
7 8
EDUğ C = A*B
C =
19 22
43 50
EDUğ C
C =
19 22
43 50
EDUğ whos
Name Size Bytes Class
A 2x2 32 double array
B 2x2 32 double array
C 2x2 32 double array
Grand total is 12 elements using 96 bytes
EDUğ det(C)
ans =
4
EDUğ diary
Diary File example2.txt Created in Working Directory:
A = [1 2;3 4]
A =
1 2
3 4
B = [5 6;7 8]
B =
5 6
7 8
C = A*B
C =
19 22
43 50
C
C =
19 22
43 50
whos
Name Size Bytes Class
A 2x2 32 double array
B 2x2 32 double array
C 2x2 32 double array
Grand total is 12 elements using 96 bytes
det(C)
ans =
4
diary off