Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please HELP! day of the week O solutions submitted (max 3) define a function called day_of_week that takes an integer value(n) and return two output
please HELP!
day of the week O solutions submitted (max 3) 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 7in' 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. ' is_weekend = logical 0 Function e Reset MATLAB Documentation 1 Code to call your function C Reset 1 [s, is_weekend] = day_of_week(1) 2 [s, is weekend] - day_of_week (2) [s, is_weekend] - day_of_week(9) Ruth Ayala - Courses & Content LMS Integration Documentation & Support Assessment: Submit (Attempt 1 of 3) day_of_week(1) day_of_week(1.5) day_of_week(9) day_of_week(2) day_of_week(7) day of the week O solutions submitted (max 3) 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 7in' 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. ' is_weekend = logical 0 Function e Reset MATLAB Documentation 1 Code to call your function C Reset 1 [s, is_weekend] = day_of_week(1) 2 [s, is weekend] - day_of_week (2) [s, is_weekend] - day_of_week(9) Ruth Ayala - Courses & Content LMS Integration Documentation & Support Assessment: Submit (Attempt 1 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started