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.

Using MATLAB, I am trying to multiply two matrices A*B by columns

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!