Question: I need a bash shell script that multiplies 2 matrices from a file. It will have a multiply function that takes an MxN and NxP
I need a bash shell script that multiplies 2 matrices from a file. It will have a multiply function that takes an MxN and NxP matrix and produce an MxP matrix. Note that, unlike addition, matrix multiplication is not commutative. That is A*B != B*A.
Here is a brief example of what the output should look like.
matrix 1 (m1):
1 2 3 4 5 6 7 8 matrix 2 (m2):
1 2 3 4 5 6 7 8
When the multiply function is ran, it should output like this:
$ ./matrix multiply m1 m2 50 60 114 140
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
