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