I need to do a exercise where I have a matrix A of size nxm, a matrix B of size m x p and a column vector x of length m. I am asked to:
a) Write a function "y = MatVecProduct(A, x)" to find y as the product of A and x using this operation:
yi = Summatory from k=1 to m of Aik * xj for all i = 1, ..., n
Then I need to run it on matlab with any vector of dimensions n = 3 and m = 4 and check the operation.
b) Write a function "C = MatMatProduct(A, B)" to find C as the product of A and B using thiis operation:
Cij = Summatory from k=1 to m of Aik * Bkj for all i= 1,...,n and for all j=1,...,p
Then run it on matlab with any matrices of dimensions n=3 and m=p=4.
Thank you in advance.