FUNCTION REFERENCE

calendar

Calendar matrix of a month.

Calendar matrix of a month.

Syntax

C = calendar(Y, M)

Syntax

C = calendar(D)

Returns a 6-by-7 matrix of the days of the month, weeks in rows starting on

Sunday, zeros elsewhere. D is a serial date number or date text.

Example

C = calendar(2016, 2); C(1, :)   % 0 1 2 3 4 5 6

Differences from MATLAB: Without an output argument the matrix is shown as ans; MATLAB prints a

titled calendar instead. calendar with no argument (the current month) is not

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.