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) andreturn two output: s which is the name of that day ina week and new line s_weekend which is a logical value that

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 s_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 = Sundayin' is_weekend = logical 1 >> [s, is_weekend] = day_of_week(2) S = 'Mondayin is_weekend = logical 1 >>[s, is_weekend] = day_of_week(9) S= 'Number must be from 1 to 7.In is_weekend = logical 0 Function o C Reset DO MATLAB Documentation Code to call your function C Reset wNw is, is_weekend] = day_of_week(1) is, is_weekend] = day_of_week (2) is, is_weekend] = day_of_week (9) Run Function ? Assessment: Submit (Attempt 4 of 6) ? 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!