Function Reference
— Function File: calendar (...)
— Function File: c = calendar ()
— Function File: c = calendar (d)
— Function File: c = calendar (y, m)

If called with no arguments, return the current monthly calendar in a 6x7 matrix.

If d is specified, return the calendar for the month containing the day d, which must be a serial date number or a date string.

If y and m are specified, return the calendar for year y and month m.

If no output arguments are specified, print the calendar on the screen instead of returning a matrix.

See also: datenum

Demonstration 1

The following code

 calendar ()

Produces the following output

Oct 2008
     S     M    Tu     W    Th     F     S
     0     0     0     1     2     3     4
     5     6     7     8     9    10    11
    12    13    14    15    16    17    18
    19    20    21    22    23    24    25
    26   *27    28    29    30    31     0
     0     0     0     0     0     0     0

Demonstration 2

The following code

 calendar (1957, 10)

Produces the following output

Oct 1957
     S     M    Tu     W    Th     F     S
     0     0     1     2     3     4     5
     6     7     8     9    10    11    12
    13    14    15    16    17    18    19
    20    21    22    23    24    25    26
    27    28    29    30    31     0     0
     0     0     0     0     0     0     0