Question

6. (10 points) Given the two matrices, A and B, compute C when (i)C= A.*B and (ii) C=A*B A = [1 O 3; 5 3 8; 2 4 6]; B = [2 3

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code

A = [1 0 3; 5 3 8; 2 4 6];
B = [2 3 7; 9 1 5; 8 8 3];

#A.*B is the element-by-element product of A and B.
C = A.*B;
disp("Result of C when we perform A.*B is ")
disp(C)

#C = A*B is the linear algebraic product of the matrices A and B.
#The number of cols of A must be equal to number of rows of B.
C = A*B;
disp("Result of C when we perform A*B is ")
disp(C)

Screenshots

multiply.m 1 A = [1 0 3; 5 3 8; 2 4 6]; 2 B = [2 3 7; 9 1 5; 8 8 3]; 3 4 #A.*B is the element-by-element product of A and B.

Output

Command Window >> multiply Result of C when we perform A.*B is 2 0 21 45 3 40 16 32 18 Result of C when we perform A*B is 26

Add a comment
Know the answer?
Add Answer to:
6. (10 points) Given the two matrices, A and B, compute C when (i)C= A.*B and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT