Question: Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function
Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function should be set up as function nd = days(mo, da, leap) where mo = the month (1–12), da = the day (1–31), and leap = (0 for non–leap year and 1 for leap year). Test it for January 1, 1997, February 29, 2004, March 1, 2001, June 21, 2004, and December 31, 2008.
Step by Step Solution
3.57 Rating (161 Votes )
There are 3 Steps involved in it
Here is an implementation of the rounder and days functions in MATLAB function y rounderx n ROUND fu... View full answer
Get step-by-step solutions from verified subject matter experts
