Question: convert to user interface input clc; clear all; close all; y = input ( ' enter m * n matrix: ' ) % Enter matrix

convert to user interface input
clc;
clear all;
close all;
y = input('enter m*n matrix:')%Enter matrix y
z = input('enter n*p matrix:')%Enter matrix z
[m1 n1]= size(y); %Find number of rows and column
[m2 n2]= size(z);
x = zeros(m1,n2);
for i =1:m1%loop will run upto number of rows in first matrix
for j =1:n2%run upto number of column in the second matrix
for k =1:n1%run upto either n1 or m2 as both are equal
x(i,j)= x(i,j)+ y(i,k)*z(k,i);
k = k+1;
end
j = j+1;
end
i = i+1;
end
disp('final output matrix:');
disp(x); %display final output matrix

Step by Step Solution

3.39 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

java import javautilScanner public class Main public static void mainString args Scanner sc... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!