Product of Two Matrices/Arrays
I have a problem where I need to compute the product of two arrays without using the * operator.
So the function would be something like:
function C = product(A, B)
[m,n] = size(A);
[u,v] = size(B);
if n ~= u
error('Inner dimensions must agree')
end
But I have no idea where to go from here. I know how to multiply matrices but not how to put it into a generalised form using for loops etc.
Can anyone help?
So the function would be something like:
function C = product(A, B)
[m,n] = size(A);
[u,v] = size(B);
if n ~= u
error('Inner dimensions must agree')
end
But I have no idea where to go from here. I know how to multiply matrices but not how to put it into a generalised form using for loops etc.
Can anyone help?
0