Question: Write a function mymul.m' in Matlab which takes 2 matrices(vectors consider to be matrices) as inputs. Now you need to write your own code to

 Write a function mymul.m' in Matlab which takes 2 matrices(vectors consider

Write a function mymul.m' in Matlab which takes 2 matrices(vectors consider to be matrices) as inputs. Now you need to write your own code to do stan- dard matrix multiplication. For example, given two matrices A and B, 'my- mul(A,B)' is the same as A*B. BUT, remember all multiplication you used must be number-number multiplication, i.e. a number times another number. NO matrix-matrix, number-matrix multiplications are allowed. Create a 'HW2_1.m file. Write 'clear;clc' after your comments and then check your answer by using the following commands: M= floor( 20*rand(3) ); N= floor( 20*rand(3) ); P= floor( 20*rand(3,4) ); if ~(mymul(M,N)-M*N) disp('Good!) end if ~(mymul(M,P)-M*P) disp('Good!) end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!