Question: MATLAB Write a MATLAB program (script) to multiply two matrices together. Do not use the MATLAB matrix multiplication function, A * B . Make the
MATLAB
Write a MATLAB program (script) to multiply two matrices together. Do not use the MATLAB matrix multiplication function, A*B. Make the program general so that it will work with matrices of any dimension. Check that the inner dimensions of the matrices are the same before performing the multiplication. If the inner dimensions do not match, display an error and stop.
You can use the MATLAB function size() to get the number of rows and columns in the matrices to be multiplied. Use the input() function to get the matrix elements. Matrices will be entered in the form [1 2 3;4 5 6;7 8 9;].
Be sure to include comments. The first comment should describe the purpose of the program and the data to be entered. Other comments should be included in the program to describe your calculations. Five percent of your program grade will be based on comments.
Use this equation to help create your script, where A and B are the matrices to be multiplied and C is the product matrix.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
