168k views
5 votes
Given the MATLAB variable: C = [ 6,8,10; 12,4,11 ] E = median(C)

Options:
A) 9
B) 10
C) 8
D) 9

User Crayl
by
8.4k points

1 Answer

4 votes

Final answer:

To calculate the median of a matrix in MATLAB, the median function is applied column-wise. For the given matrix C, the median for the first column is 9, making option A) 9 the correct answer.

Step-by-step explanation:

The student asks about calculating the median of a matrix in MATLAB. Specifically, the matrix C is given as [ 6,8,10; 12,4,11 ] and the command used is E = median(C). In MATLAB, the median function when applied to a matrix returns the median values of each column. Thus, the medians are [9, 6, 10.5], so option A) 9 is the correct answer because the median of the first column (6 and 12) is 9.

User Praveen Dabral
by
7.5k points