Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Function Name: hypePlays Inputs 1. (char) A character vector containing the two players in a match, separated by only a comma (char) A character

image text in transcribedMATLAB

Function Name: hypePlays Inputs 1. (char) A character vector containing the two players in a match, separated by only a comma (char) A character vector containing the match commentary 2. Outputs: 1. (char) A character vector describing how hype the match was Background: As the expert Smash Bros player that you are, you have been invited to serve as a judge at the annual International Super Smash Bros Convention! t is your job to watch hundreds of matches and judge them based on their hype factor, an interesting but extremely time-consuming task. To save yourself some time, you call upon your trusted friend MATLAB, who can simply read through the match commentary and do all the number crunching for you Function Description: Write a function that uses the following criteria to rate a match's hype 1. The match earns 10 points every time the commentary mentions one of the players' 2. 3. 4. names, case-sensitive If one of the players is Kirby', case-sensitive, the match earns 20 points If both of the players' names start with the same letter, it loses 15 points If the commentary mentions 'finalsmash', case-insensitive, the match earns 45 points Your function should output a vector of characters in the following format: The match between and received a score of points." Example: >out-hypePlays('Pikachu, Kirby 'A beautiful match between Pikachu and Kirby. Smash ball is on screen and WOW, Pikachu has got it and has used the FinalSmash. Kirby is off-screen and it is game over.') out The match between Pikachu and Kirby received a score of 105 points.' Hints: Performing a mathematical operation on a logical will result in its automatic conversion to a double . . You may find the strtok) and sprintf) functions to be useful You do not need conditionals to solve this

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions