Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function Name: roundRobin. Need the MATLAB code for this problem! Make sure the test cases match! Function Name: roundRobin Inputs 1. (char) An Nx15 character

Function Name: roundRobin. Need the MATLAB code for this problem! Make sure the test cases match!

image text in transcribedimage text in transcribed

Function Name: roundRobin Inputs 1. (char) An Nx15 character array of game scores Outputs: 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 t 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. Eaclh 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 lOC country codes. Before each 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 ABC> won the round robin with a record of N>-L>.' where is replaced by the lOC country code, are wins, and are losses. Example: >> arr = '02 USA-OAR 01 12 USA SVK 00 >> result = roundRobin(arr) result'Team USA won the round robin with a record of 2-0. Function Name: roundRobin Inputs 1. (char) An Nx15 character array of game scores Outputs: 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 t 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. Eaclh 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 lOC country codes. Before each 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 ABC> won the round robin with a record of N>-L>.' where is replaced by the lOC country code, are wins, and are losses. Example: >> arr = '02 USA-OAR 01 12 USA SVK 00 >> result = roundRobin(arr) result'Team USA won the round robin with a record of 2-0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago

Question

Connect with your audience

Answered: 1 week ago