Question: define a function called day_of_week that takes an integer value(n) and return two output: s which is the name of that day in a week



define a function called day_of_week that takes an integer value(n) and return two output: s which is the name of that day in a week and new line is_weekend which is a logical value that represent that they is weekend or not if n is not an integer value between 1 to 7, s should be 'Number must be from 1 to 7. n' example >>[s, is_weekend] = day_of_week(1) S = Sunday ' is_weekend = logical 1 >>[s, is_weekend] = day_of_week(2) S = 'Monday ' is_weekend = logical 1 >> [s, is_weekend] = day_of_week(9) Function Reset MATLAB Documentation 1 Code to call your function C Reset 1 [s, is_weekend] = day_of_week(1) [s, is_weekend] = day_of_week(2) [s, is_weekend] = day_of_week (9) 3 MATLAB Editor to write code to run your solution. To change focus out of the editor, press the Escape Key. Then press Tab to move to the next field, Shift-Tab to move to the previous field, or Enter to return to the MATLAB Editor. Run Function Assessment: Submit (Attempt 2 of 3) day_of_week(1) day_of_week(1.5) day_of_week(9) day_of_week(2) day_of_week(7)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
