Question: MATLAB. PLEASE USE MATLAB. Function Name: roundRobin Inputs: 1. (char) An Nx15 character arra y of game scores 1. (char) A string describing the outcome

MATLAB. PLEASE USE MATLAB.

MATLAB. PLEASE USE MATLAB. Function Name: roundRobin Inputs: 1. (char) An Nx15

Function Name: roundRobin Inputs: 1. (char) An Nx15 character arra y of game scores 1. (char) A string describing the outcome of the round robin Background The National Hockey League (NHL) made news this Olympic season by announcing that it will not be allowing its players to participate in the PyeongChang games. This move has set the stage for an exciting men's tournament where a country besides Canada stands a chance of winning. In anticipation for the finals, you decide to revisit the excitement of the round robin games. Function Description: Round robin is a tournament format where each team plays a game against every other team in the bracket. Given a character array of the games results, write a function called roundRobin) that outputs a character vector describing the winner of the round robin. Each row in the character array represents one game, formatted in the following way: 00 ABC DEF 00 ABC' and 'DEF' are the teams with their three-letter IOC country codes. Before eaclh three-letter code are the goals scored by the team (always displayed as two digits). The team that wins the most games is the winner of the round robin. The output should be formatted 'Team won the round robin with a record of - where is replaced by the IOC country code, are losses. Example >> arr . '02 USA OAR 01 12 USA SVK 00 > result-roundRobin(arr) resultTeam USA won the round robin with a record of 2-0 Homework 07 -Iteration Notes: .No game will end in a tie There can be any number of teams or games played There is guaranteed to be one team in first place Hints Think about how you could use a character vector to keep track of the teams

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!