Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You must read in data from two, separate, Excel files. The first file will conta

ID: 3834351 • Letter: Y

Question

You must read in data from two, separate, Excel files. The first file will contain a row of names and is henceforth referred to as the Names File. The second file will contain numeric data and is henceforth referred to as the Scores File. The Scores File will have the same number of columns as the Names File, and a total of 13 rows of numeric data for each column. For instance, if there are two names in the names File, then the Scores File will contain 13 rows by 2 columns of scoring data. Each column in the Scores File represents the 13 weekly scores for the player with the name in the same column in the Names File. Examples of each file are provided below.

Sample Names File

A

B

C

1

John

Suzanne

Brett

2

Sample Scores File

A

B

C

1

120

102

87

2

89

98

180

13

134

56

110

Where the A column in the Scores file represents the weekly scores for John. Your job is to write MATLAB to read in the data from the two Excel files, then determine the winner of each week (the player with the highest score), and the winner of the league (the highest score accumulated through all 13 weeks). You will then display to the Command Window, the winner of each week using their names and scores. You will also plot the weekly scores, 1 to 13, for each player, in the same figure, to provide a graphical representation of the players’ performance through all 13 weeks. Be sure to alter line types, marker shapes and line colors to differentiate between players. Include all the components of a proper plot.

A

B

C

1

John

Suzanne

Brett

2

Explanation / Answer

clc,clear

scores = xlsread('Scores.xlsx');
[num name raw] = xlsread('NamesF.xlsx');

plot(scores,'o-')
xlabel('Week')
ylabel('Scores')
title('SCores Data plotting')
M = max(scores,[],2);
totalScore = sum(scores)
winner = max(totalScore)

fprintf('The winner for week 1 are name %s with %d score. ',name(1),M(1))
fprintf('The winner for week 2 are name with %d score. ',name(2),M(2))
fprintf('The winner for week 3 are name with %d score. ',name(3),M(3))
fprintf('The winner for week 4 are name with %d score. ',name(4),M(4))
fprintf('The winner for week 5 are name with %d score. ',name(5),M(5))
fprintf('The winner for week 6 are name with %d score. ',name(6),M(6))
fprintf('The winner for week 7 are name with %d score. ',name(7),M(7))
fprintf('The winner for week 8 are name with %d score. ',name(8),M(8))
fprintf('The winner for week 9 are name with %d score. ',name(9),M(9))
fprintf('The winner for week 10 are name with %d score. ',name(10),M(10))
fprintf('The winner for week 11 are name with %d score. ',name(11),M(11))
fprintf('The winner for week 12 are name with %d score. ',name(12),M(12))
fprintf('The winner for week 13 are name with %d score. ',name(13),M(13))
fprintf('The overall winner are name with %d score. ',winner)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote