A year containing a date or not
2 views (last 30 days)
KSSV on 3 Jul 2020
Read about the function calendar. https://in.mathworks.com/help/matlab/ref/calendar.html
Fromhere you can pick the required column,(first column corresponds to Sunday) and check whether the given day is present or not.
Walter Roberson on 3 Jul 2020
year = 2050; month = 1;
has_sunday30 = weekday(datetime(year, month, 30)) == 1;