Question
1. Consider the matrix defined below. What value is referenced with ? (a) 7 (b) 10 (c) 5 (d) 3 (e) None of the above.
1. Consider the matrix defined below.
What value is referenced with ? (a) 7 (b) 10 (c) 5 (d) 3 (e) None of the above. 2. Consider the matrix defined below.
What value is produced by the command ? (a) 18 (b) 21 (c) 10 (d) 26 (e) 42
Sol109:
For the matrix defined as A=[1,2,3,4;5,6,7,8;9,10,11,12]:
1. The value referenced with A(3,2) is 10. This corresponds to the element in the third row and second column of the matrix.
2. The command sum(A(2,:)) produces the value 26. This command takes the second row of the matrix A (i.e. the row containing the elements 5, 6, 7, and 8) and adds up all of the values in that row. Therefore, the sum of 5+6+7+8 is 26.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started