Question: Function Name: suitorCompatibility Inputs: 1. ( char ) 1x7*N string of chars containing the suitors names 2. ( double ) 1xN vector containing the suitors
Function Name: suitorCompatibility
Inputs:
1. ( char ) 1x7*N string of chars containing the suitors names
2. ( double ) 1xN vector containing the suitors matlab skill levels out of 10
Outputs:
1. ( char ) String announcing the ultimate suitors
Banned Functions:
repelem()
Topics: ( masking ), ( strings), (vectors )
Background:
Being the MATLAB aficionado that you are, Matlabbers from every corner of the world
have been lining up all year to be your Valentine. But, you cant compromise for just anyone.
After several rounds of intense competition, youve managed to narrow your potential suitors
down to the final few. Now, its time for the final most important test of compatibility. You need to
spend the special day with only the gifted few who know bae just as well as you do. Not so soon
though! Angry that they didnt make it this far into the courtship contest, someone messed up
the order of suitors so they couldnt be matched. Who else could save the day and help you find
the gifted few three than bae itself?
Function Description:
Given a list of names in no particular order, rearrange the names alphabetically and then
get out the three suitors receiving a MATLAB skill level above a 7. The skill levels only match
the names once they are in alphabetical order. Once you have the compatible suitors, output
the names in the following format:
And the ultimate suitors are...
!!!
Example:
names = nikita johnny divesh oliver rohini siddhu
skill = [9 8 3 6 10 4]
winners = suitorCompatibility(names, skill)
winners =
And the ultimate suitors are... divesh johnny rohini !!!
Notes:
All the names will always be 6 letters long and be separated by a single space
There will be an extra space at the end of the names string
There will be only ever by 3 winners each time
Every name will start with a different letter
Hints:
The colon operator will be useful to alphabetize the names
Can someone pls help this matlab problem without using conditional functions like if and for? (all conditional functions are banned)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
