Problem 1 Write a function 'mymul.m' in MATLAB which takes 2 matrices as input and returns their matrix product. But, you cannot use MATLAB's matrix multiplication. Every multiplication that appears...


Problem 1<br>Write a function 'mymul.m' in MATLAB which takes 2 matrices as input and returns their<br>matrix product. But, you cannot use MATLAB's matrix multiplication. Every<br>multiplication that appears in your funetion must be number-mumber multiplication. If at<br>any point you have matrix-number, number-matrix, matrix-matrix, vector-matrix, matrix-<br>vector, or other element-wise multiplication you will not receive credit for this problem.<br>Then, create a file called 'HW2pl.m'. Follow your initial comments with the clear and<br>clc commands and check your function with the following commands:<br>M = floor (20*rand (3));<br>N = floor (20*rand (3));<br>P = floor (20*rand (3,4));<br>if

Extracted text: Problem 1 Write a function 'mymul.m' in MATLAB which takes 2 matrices as input and returns their matrix product. But, you cannot use MATLAB's matrix multiplication. Every multiplication that appears in your funetion must be number-mumber multiplication. If at any point you have matrix-number, number-matrix, matrix-matrix, vector-matrix, matrix- vector, or other element-wise multiplication you will not receive credit for this problem. Then, create a file called 'HW2pl.m'. Follow your initial comments with the clear and clc commands and check your function with 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!"); else disp("NOT GOOD."); end if "(mumul (M,P) - M*P) disp("ALSO GOOD!"); else disp("NOT GOOD."); end

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here