M Mỹ Duyên New member Sep 19, 2021 #1 What is the output of the following code? Code: A=[1 2]; B=[1 4]; c=A*B; A. c= [1 8] B. c = 1 8 C. Inner Matrix dimensions must agree D. No output since we have closed the line of code with a semicolon
What is the output of the following code? Code: A=[1 2]; B=[1 4]; c=A*B; A. c= [1 8] B. c = 1 8 C. Inner Matrix dimensions must agree D. No output since we have closed the line of code with a semicolon
P Phương Linh New member Sep 19, 2021 #2 Answer:c Explanation: Multiplication of two row vectors is possible if we use the ‘.*’ operator. If B was a 1*2 column vector, the multiplication would have been possible resulting in a multiplication of vectors and generating c=9 as output. Upvote 0 Downvote
Answer:c Explanation: Multiplication of two row vectors is possible if we use the ‘.*’ operator. If B was a 1*2 column vector, the multiplication would have been possible resulting in a multiplication of vectors and generating c=9 as output.