diff options
Diffstat (limited to '104/CH2/EX2.17/2_17.sce')
-rwxr-xr-x | 104/CH2/EX2.17/2_17.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/104/CH2/EX2.17/2_17.sce b/104/CH2/EX2.17/2_17.sce new file mode 100755 index 000000000..581de2719 --- /dev/null +++ b/104/CH2/EX2.17/2_17.sce @@ -0,0 +1,17 @@ +//multiplication of matrices
+A=[3 -1;0 1;2 0]
+B=[1 0 -1;2 1 0]
+C=size(A)
+D=size(B)
+if C(1,2)==D(1,1) then
+ AB=A*B
+ disp(AB,"AB=")
+else
+ disp("matrices are not conformable for multiplication AB")
+end
+if D(1,2)==C(1,1) then
+ BA=B*A
+ disp(BA,"BA=")
+else
+ disp("matrices are not conformable for multiplication BA")
+end
|