Question: Using MATLAB, I am trying to multiply two matrices A*B by columns rather than rows. Here's what I have but something is wrong. At the
Using MATLAB, I am trying to multiply two matrices A*B by columns rather than rows. Here's what I have but something is wrong. At the very least I know there is a mistake in line 9 and I'm not entirely sure if line 6 is right.

function [ C ] = mycolumnproduct( A, B ) % Evaluates A*B by columns A and B are both matrices [ n] size (A) ; [p, g] size (B) ; if (n-p) C for zeros (1, n) ; i = 1:n end else disp ('dimensions do not match' C= []; end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
