Given a Matrix A = [1:5; 6:10; 11:15; 16:20],
1. Create a row vector of 1's that has same number of elements as A has rows.
2. Create a column vector of 1's that has same number of elements as A has columns.
3. Using matrix multiplication, assign the product of the row vector, the matrix A, and the column vector (in this order) to the variable "result".
Answers
Answered by
23
The answers to the questions are as follows:
1. Row vector of 1's that has the same number of elements as A has rows.
Row_vector = ones(1,size(A,1));
2. Column vector of 1's that has same number of elements as A has columns.
Column_vector=ones(size(A,2),1);
3. Using matrix multiplication, assign the product of the row vector, the matrix A, and the column vector (in this order) to the variable "result".
result = Row_vector*A*Column_vector;
Answered by
12
Answer:
Value of result =210
Step-by-step explanation:
Row=[1 1 1 1]
Column=[1;1;1;1;1]
result=Row*A*Column
Similar questions