Question: Numerical Methods for Engineers, ME 325, Fall 2017 4. Write a user-defined function, i.e., matrix_ mult_IYOUR WSU IDJ.m, calculating a matrix multiplication (4 pt). Requirement
Numerical Methods for Engineers, ME 325, Fall 2017 4. Write a user-defined function, i.e., matrix_ mult_IYOUR WSU IDJ.m, calculating a matrix multiplication (4 pt). Requirement matrix mult_Al11B222.m: 1- The students MUST NOT use the built-in Octave (or Matlab) syntax to execute the matrix multiplication, i.e., A B, for the multiplication for matrices A and B. If the matrix multiplication is calculated using Octave (or Matlab) syntax, i.c., A B, no credit will be given. 2. Instead, the students need to follow the principle of the matrix multiplication (see below) 3. It requires two input arguments, one for the first matrix and the other for the second matrix, 4 The function should include a script for error message when the matrix multiplication 5. The student needs to turn in the following: (a) The Octave (or Matlab) script for user and use "for" loop (or "while" loop) to accomplish the matrix multiplication. (2 pt) and one output matrix (result of the multiplication of two matrices). cannot be calculated, due to the size mismatch for the matrices A and B. (I pt) defined function, "matrix mult_A111B222.m" and the screen capture of the Octave (or Matlab) command window, showing the function run (see the example execution above) (I pt). Given a mxn matrix A and a nxp matrix B, the multiplication of matrices of A and B, i.e. AB is defined to be a mxp matrix C, whose elements, i.e., Cy, are computed from the elements of A and B, i.e., aa and by, according to In command window, if the matrices of A and B are given as 20 3 4 The outcome of matrix mult_A111B222(A,B) should be in the following 14 17 AB =C In other words, if the student type the C command window, it should return as matrix mult Al11B222(A,B) in the Octave (or Matlab) You need to turn in Octave (or Matlab) output by running the developed script, matrix mult A111B222.m in the command window as given below >>A-142 B-[21:34 enter> C matrix mult Al11B222(A,B) Center> 14 17
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
