How to create a function of calendar in Matlab ?
27 views (last 30 days)
how to creat a function for Number of Months of the year, Such that when we find the June and July, Function must declare it as month of summer vacation and when we find the December and January, Function must declare it as month of winter vacation. Otherwise it must show that “ it is time to go to University.
Anmol Dhiman on 24 Jun 2020
You can use the below code
if(month == 6 || month == 7)
disp("month of summer vacation");
elseif(month == 1 || month == 12)
disp("month of winter vacation");
disp("Wrong inpit. Please enter month from 1 to 12");
You can refer to functions for more information.