Vector of data X, which has 30 elements, is given as: X = [2, 2.5, 2.5, 3, 3, 3.
ID: 667628 • Letter: V
Question
Vector of data X, which has 30 elements, is given as:
X = [2, 2.5, 2.5, 3, 3, 3.4, 4, 4.2, 4.6, 5, 5.3, 5.7, 6, 6.3, 6.7, 7.1, 7.4, 7.6,8.2, 8.4, 8.5, 9.3, 9.6, 9.8, 10, 10.4, 10.8, 11.1, 11.4, 11.7]
The vector of bin centers is specified as:
centers = [2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5]
What MATLAB command(s) should you use to get histogram plotted with the given bin centers?
a. linspace(X, centers);
b. freq(X, centers);
c. right_edges(X, centers);
hist(X);
d. hist(X, centers);
e.
centers = linspace(2, 11.7, 10);
hist(X);
Explanation / Answer
the correct option is C.
hist command will be used to plot the histogram.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.