Creating Functions and Switch
1 view (last 30 days)
Show older comments
Write a script and a function that asks you to provide a month as an input for a given year (e.g. 2 or February for 2nd month of the specified year) and returns the number of days and number of hours in that particular month. Use the switch-construction. Be mindful about the exceptions such as leap years. Create the function separately for determining the number of the days and hours.
2 Comments
Answers (0)
See Also
Categories
Find more on Dates and Time in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!