Write an algorithm for finding the day of the date which is 37 days after today. Implement your algorithm in Matlab.
For the given problem we will need two functions to be used in
matlab
the first is datetime() finction which gives us datetime, when the
argument is 'now'
hence datetime('now') givens date and time of right now
now to add 37 days to todays time and date, we can use days()
finction with argument being number of days we want to add
hence
the following is the matlab code
tnow = datetime('now') % take todays daytime and save in variable
tnow
tthen = tnow + days(37) % add 37 days to tnow to get tthen
Get Answers For Free
Most questions answered within 1 hours.