Question: Please read these instructions before you attempt to solve this problem. Download the live script file MAT 3 4 3 lab 2 ex 4 .
Please read these instructions before you attempt to solve this problem.
Download the live script file MATlabexmlx and open it with matlab. Run the file and use the information provided to complete the following exercise. For your convenience, a pdf version is also provided. Before you attempt this exercise, you might want to watch the last video of the video tutorials for this lab.
The product of an matrix A times a column vector dots, can be computed rowwise as below:
:;:;dots;:
that is
:
:
cdots
:
Write a function named myrowproduct that takes in input a matrix a column vector and a random number and as output gives the product computed by row as defined above, and the intermediate value, of the output vector at the end of iterations this intermediate value is used by MATLAB Grader to determine whether your code is correct
Specific instructions for writing the function:
function myproductrow
This function evaluates the product by row
where is a matrix and is a vector
Kortney Schaum
size;
size;
if &&
zeros;
;
for :
;
if
;
end
end
;
;
end
end
Code to call your function
C Reset
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
