Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MATLAB Function Name: rage Inputs: 1. (char) A 1x(6*N) vector of character names 2. (logical) A 1xN vector of whether or not that character

image text in transcribedUsing MATLAB

Function Name: rage Inputs: 1. (char) A 1x(6*N) vector of character names 2. (logical) A 1xN vector of whether or not that character has the rage bonus 3. (double) A 1xN vector of characters' damage Outputs: 1. (char) A 1xP vector of the characters with the bonus 2. (double) A 1xN vector of the characters' modified damage Background: Sometimes when you're on your last leg, you get an extra burst of adrenaline that gives you the power to push through. The amazing game Super Smash Bros has a feature that mimics this fantastic biological feat in the form of rage. When a character is damaged enough they receive an increase in the amount of damage they do. You want to write a function in MATLAB to predict how much a character with rage will do Function Description: Given a list of the first 5 letters of smash characters separated by spaces, a logical vector of representing which characters have rage, and a vector containing the characters' damage stats, output a list of the characters that have the rage damage modifier and an updated damage vector. The damage vector should have all of the characters' damage stats, but characters that have the rage damage modifier should have their damage multiplied by 1.15 Example: > characters'KIRBY FALCO JIGGL LUCAS YOSHI BOWSE >> rageVec[true true false false true true]m damage[15.5, 16.6, 8.5, 14.2, 17.1, 22.1] >> [buffedCharacters, damageModified] -rage (characters, rageVec, damage) buffedCharacters -KIRBY FALCO YOSHI BOWSE damageModified [17.8, 19.1, 8.5, 14.2, 19.7, 25.4] Notes: Character names will always be five capital letters followed by a space, both in the input and output Round the values in your damage vector to the first decimal place The rage vector is guaranteed to have at least one true

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions