In elementwise multiplication A.*B each value in one matrix is paired up with a buddy value in the other and they are multiplied together. In matrix multiplication A*B each row in matrix A is dot-producted with each column in matrix B. The value in the upper left corner of the matrix C is the same as which of the following? C = A*B; options:   A(1,1) * B(1,1)   dot(A(1,:),B(:,1))   A = [3 1;      5 2]; B = [1 -1;      4  0]; C = A*B the value in the upper left corner of the matrix C is which of the following?   % Starting with this code: a = [1 2 3] b = [-1 0 1] % All of the following are identical, except which one?   Question 4 options:   dot(a,b)   a*transpose(b)   b*transpose(a)   sum(a.*b)   They are all identical Fill in the blank to calculate the dot product of amounts and costs. amounts = [2 1 2 5 1] costs = [3.5 1.25 4.25 1.55 3.15] ____________   Question 5 options:   costs * amounts   dot(costs, amounts)   product(costs, amounts)   costs .* amounts

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

In elementwise multiplication A.*B each value in one matrix is paired up with a buddy value in the other and they are multiplied together.
In matrix multiplication A*B each row in matrix A is dot-producted with each column in matrix B.
The value in the upper left corner of the matrix C is the same as which of the following?
C = A*B;

options:

 

A(1,1) * B(1,1)

 

dot(A(1,:),B(:,1))

 

A = [3 1;
     5 2];
B = [1 -1;
     4  0];
C = A*B
the value in the upper left corner of the matrix C is which of the following?

 

% Starting with this code:
a = [1 2 3]
b = [-1 0 1]
% All of the following are identical, except which one?

 

Question 4 options:

 

dot(a,b)

 

a*transpose(b)

 

b*transpose(a)

 

sum(a.*b)

 

They are all identical

Fill in the blank to calculate the dot product of amounts and costs.
amounts = [2 1 2 5 1]
costs = [3.5 1.25 4.25 1.55 3.15]
____________

 

Question 5 options:

 

costs * amounts

 

dot(costs, amounts)

 

product(costs, amounts)

 

costs .* amounts

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage