summaryrefslogtreecommitdiff
path: root/3808/CH2/EX2.17/Ex2_17.sce
blob: 9081c7e982b8d76b39dfd24c11a4845e151eff7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices

clc;
clear;

A = [[1,1],
[2,1]]

B = [[2,1],
[1,1]]

m1=A*B
m2=B*A

disp(m1,'A*B=')
disp(m2,'B*A=')

if m1==m2 then
    disp('AB=BA')
else
    disp('AB!=BA')
end