Untitled
unknown
plain_text
a year ago
518 B
6
Indexable
m = input("Enter the number of rows of matrix: ");
n = input("Enter number of columns of matrix: ");
disp("Enter fisrt matrix: ");
for i = 1:m;
for j =1:n;
A(i,j) = input('\');
end
end
disp("Enter the second matrix: ");
for i = 1:m;
for j =1:n;
B(i,j) = input('\');
end
end
for i = 1:m
for j = 1: n
C(i,j) = A(i,j) + B(i,j);
end
end
disp("THE FIRST MATRIX IS : ");
disp(A);
disp("THE SECOND MATRIX: ");
disp(B);
disp("The sum of two matrices is: ");
disp(C);Editor is loading...
Leave a Comment