FOR THE FOLLOWING EXAMPLE POST THE M-FILE IN MATLAB FOR THE FOLLOWING STEPS ExE(
ID: 3589847 • Letter: F
Question
FOR THE FOLLOWING EXAMPLE POST THE M-FILE IN MATLAB FOR THE FOLLOWING STEPS
ExE(4) a) Create B which is a 4 by 6 matrix with elements evenly spaced between -20 and 18. b) Create another matrix C that is 3 by 8 with random integers between -30 and 8. c) Try to add the elements in B with elements in C and store the 24 numbers in a row vector h. d) Flip the columns of B to the right and store the results in A. e) Subtract A from B and report the results. f) Create a new matrix G which has 6 rows and 32 columns and has the same elements as C. g) Multiply B and G and store the results in K. h) How many elements K has? What is the size of K?Explanation / Answer
Actually For the matrix addition we have one rule that the number of rows in first matrix should be match with the number of columns in the second matrix.
In MATRIX B number of rows=4
In MATRIX B number of columns=8
So Matrix addition or substraction is not possible here
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.