Write the following function. Do NOT hard code for the examp…
Write the following function. Do NOT hard code for the example inputs. Your function should work for all possible inputs as specified by the problem. Hard coding will result in significant point loss. Function Name: theHulk Inputs (1): (char) The name of an Excel file with the extension .xlsx Outputs (1): (char) An Mx1 cell array of the names of everyone who met all conditions, listed alphabetically File Outputs (1): An updated Excel file containing an appended ‘Capable’ column Function Description: Feeling motivated by Lorde’s new album to get your dream hot summer body, you and your friends develop an extreme training regimen inspired by your favorite hero, The Hulk. You put your workout to the test using MATLAB to determine whether you’re capable of becoming the next Hulk. Given the name of an Excel file, check to see if the following requirements have been met: The value in the ‘Strength’ column is greater than or equal to 500. The value in the ‘Color’ column is greater than or equal to 128 OR reads as ‘Green’. While the ‘Strength’ column is guaranteed to have data of class numeric, the ‘Color’ column could contain data of either class numeric or class char. If the value in the ‘Color’ column reads as ‘Not Green’, then that person has not met the condition. There will always originally be 3 columns, and the order of them will always be ‘Name’, ‘Strength’, ‘Color’. After checking the data for everyone in the Excel, append a column to the end of the sheet with the header ‘Capable’. Input a logical true in this column for those who met both requirements and a logical false for those who did not. Write the edited cell array to a new Excel file with ‘_fixed.xlsx’ appended onto the original filename, and output the names of everyone who has a logical true in the ‘Capable’ column in a cell array sorted alphabetically. Notes: For data of class char, you are guaranteed to have either ‘Green’ or ‘Not Green’ written in this exact manner (e.g. you will never have ‘green’ instead of ‘Green’). All cells are guaranteed to contain data. HINT: the class() and ischar() functions might be useful! Example: Answer this question by typing your code in the space provided below.
Read Details