Ask your own question, for FREE!
Mathematics 19 Online
OpenStudy (raffle_snaffle):

matlab

OpenStudy (raffle_snaffle):

@jim_thompson5910

OpenStudy (raffle_snaffle):

%% 5.21 % Let the vector G = [68, 83, 61, 70, 75, 82, 57, 5, 76, 85, 62, 71, % 96, 78, 76, 68, 72, 75, 83, 93] represent the distribution of final % grades in an engineering course. % (a) Use MATLAB to sort the data and create a bar graph of the % scores. % vector G (test scores for engineer students) G = [68, 83, 61, 70, 75, 82, 57, 5, 76, 85, 62, 71, 96, 78, 76, 68, 72, 75, 83, 93]; newG = sort(G(:)) % sorts scores lowest to highest, lowest starting at the top bar(newG); title('Final grades for engineering students'); xlabel('number of students'); ylabel('scores out of 100 points'); % (b) Create a histogram of the scores, using his. nbins = 20; % number of bins hist(G, nbins); % displays histogram for 10 bins

OpenStudy (raffle_snaffle):

so where it says nbins the directions didn't specify how many bins I should use? Do you have any suggesions? I used 15

OpenStudy (raffle_snaffle):

20

jimthompson5910 (jim_thompson5910):

nbins = 20; % number of bins hist(G, nbins); % displays histogram for 10 bins you wrote 20 but then you mention 10. Which is it?

OpenStudy (raffle_snaffle):

haha it's 20

OpenStudy (raffle_snaffle):

% (b) Create a histogram of the scores, using his. nbins = 20; % number of bins hist(G, nbins); % displays histogram for 20 bins

jimthompson5910 (jim_thompson5910):

as for your question on how many bins to use, I'm not sure. I think at least 5 or so. So 20 bins is probably good. If you get too big, then things look very scattered out so you may need to lower the bin number

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!