Answered step by step
Verified Expert Solution
Question
1 Approved Answer
function C=myMatoperation! (A, B) which takes two matrices, A and B with ncom patibility restrictions. The function wil return a matrix C with the following
function C=myMatoperation! (A, B) which takes two matrices, A and B with ncom patibility restrictions. The function wil return a matrix C with the following characteristics -C will have the same number of rows of A and the same number of columns as B - For some row i, and some column j, C(i,j) will either be o The mean of row i of A or o The mean of col j of B Whichever has a larger absolute value DO NOT use the colon operator in your solution - - The only built-in functions you can use are size, zeros, and abs >> A = [82 10-16 15; 91 -28 98 43 13 55 96 92; -92 96-49 80: 64 97 -81 961 >> B = [66-75 28 96 19 28-96; 4 -40 5 4-49 68 35 85 66 10 44 45 66 59 94 -18 83 39-65 17 23 68 71 70 77-71 12 76; 76 4 -32 80 76 -50 26] >> Q = myMatOperation1 (A, B) 65.5 65.5 65.5 65.5 65.5 You can spot check values using mean >>mean (A (1,:)) ans = 56.667 56.667 64 56.667 56.667 22.75 51 64 8.75 23.5 51 64 23.5 22.75 51 64 20.5 22.75 51 64 8.75 27.333 51 64 27.333 >>mean (B(,1) ans 22.75 65.5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started