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
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 |
Trending now
This is a popular solution!
Step by step
Solved in 3 steps