Question: Define a matlab function which takes four ( 4 ) scalar positive integer inputs: month 1 , day 1 , month 2 , day 2
Define a matlab function which takes four scalar positive integer inputs: month day month day These represent the birthdates of two babies, both born in The function should check that each of the input values are of correct types and check that they represent valid dates each input is a scalar, each input is an integer, both months are within both days are within x x depending on their corresponding months If any of the inputs provided is incorrect, display a specific message telling about the type of incorrectness. If everything checks out, the function should automatically return a positive scalar integer that is equal to the difference in days between the ages of the two babies. Create a variable named year in which you will store the number of days that each month of a nonleap year contains.
The built in function isscalar as well as a rounding funcon can be useful. Avoid using isinteger
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
