Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

calendar

Calendar for specified month

Syntax

c = calendar
c = calendar(d)
c = calendar(y, m)

Description

c = calendar returns a 6-by-7 matrix containing a calendar for the current month. The calendar runs Sunday (first column) to Saturday.

c = calendar(d), where d is a serial date number or text representing a date and time, returns a calendar for the specified month.

c = calendar(y, m), where y and m are integers, returns a calendar for the specified month of the specified year.

If you do not specify an output argument, then calendar displays a calendar in the Command Window but does not return a value.

Examples

The command

calendar(1957,10)

reveals that the Space Age began on a Friday (on October 4, 1957, when Sputnik 1 was launched).

                    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

See Also

Introduced before R2006a

Was this topic helpful?