blob: 0b7693255b90b4a1efc92b23b40979874882b8ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//equality of matrices
A=[1 2;3 4]
B=[1 2;3 4]
x=1;
for i=1:2
for j=1:2
if A(i,j)~=B(i,j) then
x=0
end
end
end
if x==1 then
disp("matrices are equal")
else
disp("matrices are not equal")
end
|