Question: for MATLAB class. Please test first. 4. This problem deals with structures that represent dates. a. First, write a MATLAB function called createDate that will

for MATLAB class. Please test first.

for MATLAB class. Please test first. 4. This problem deals with structures

4. This problem deals with structures that represent dates. a. First, write a MATLAB function called createDate that will take in three numeric parameters. The first parameter represents the month, the second the day, and the third the year. The function should return a structure with the following fields: Day: a number Month: a 3 character string containing the first three characters of the month name Year: a number containing the year. For example, it = createDate(3,30,2008) should return a structure containing Day: 30 Month: Mar Year: 2008 b. Write a function called printDate that displays a date in the form Mar 30, 2007 c. Write a function inBetween that will take in three date structures. The function should return true if the second date is between the first and third dates, otherwise the function should return false. d. Write a function called issorted that takes in a single parameter, an array of date structures. This function should return true if all the dates in the array are in a chronological order (regardless of whether they are in ascending or descending order), otherwise the function should Hints return false. It might help to add a field to the date class. e. Write a test script that creates an The third date does not have to be chronologically array of date structures, prints out later than the first date. each date, and then states whether or not the dates are in order

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!