Question: cowboyTryouts Function Name: cowboyTryouts Input: ( 1 N char ) A Cell Array containing data about horses ( 1 M char ) A header name
cowboyTryouts
Function Name: cowboyTryouts
Input:
N char A Cell Array containing data about horses
M char A header name of a column in the cell array. The column may containing data of type
double OR char.
Output:
cell A cell array with updated information
Description:
You are given a cell array containing data about the different cowboys who are trying out for the team.
The cell array is guaranteed to contain the following columns in no particular order there may be more
columns:
'Horse Color' this column contains all chars
'Lasso Time' this column contains all doubles
'Draw Time' this column contains all doubles
Your code should do the following in order:
Delete all of the rows with horses whose color is 'Gray' case insensitive
Create a new column with the header 'Stats' in the last column. This column should contain Lasso
Time divided by Draw Time rounded to the second decimal place for each cowboy.
Delete the columns containing 'Lasso Time' and 'Draw Time'
Sort the values based on the column with the header matching the second input string in descending
order
Week Cell Arrays Fall
Examples:
data Name 'Horse Name' 'Lasso Time' 'Horse Color' 'Draw Time' 'Ranking' 'Farm'
'Amber' 'Bessie Bluebird' 'White' 'Harlindale'
'Jessie' 'Kansas Clara Belle' 'Black' 'Spring Lake'
'Javier' 'Juniper Run' 'Gray' 'Fausey Medows'
'Franklin' 'Fazia Tanier' 'Beige' 'Castleberry Hills'
'Dawn' 'Quiet Decanter' 'Gray' 'Crenshaw Falls'
'Gerald' 'Chicago Slim' 'White' 'Easter Station'
'Maria' 'Gertrude' 'Gray' 'Back ;
updated cowboyTryoutsdata'Stats'
updated cowboyTryoutsdata'Ranking'
updated cowboyTryoutsdata'Horse Name'
Notes:
The first row of the input cell array contains headers and each column contains only one data type.
You can't use the 'descend' input when dealing with cell arrays of chars. Instead you have to sort it
by default in ascending order and then reverse the outputs.
You will not have to sort by 'Lasso Time' or 'Draw Time'.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
