Main Content

datedisp

Display date entries

Description

datedisp(NumMat,DateForm) displays the matrix with the serial dates formatted as date character vectors, using a matrix with mixed numeric entries and serial date number entries. Integers between datenum('01-Jan-1900') and datenum('01-Jan-2200') are assumed to be serial date numbers, while all other values are treated as numeric entries.

example

CharMat = datedisp(NumMat,DateForm) displays the output matrix CharMat.

example

Examples

collapse all

This example shows how to display dates for serial date numbers.

NumMat = [ 730730, 0.03, 1200, 730100;
           730731, 0.05, 1000, NaN]
NumMat = 2×4
105 ×

    7.3073    0.0000    0.0120    7.3010
    7.3073    0.0000    0.0100       NaN

datedisp(NumMat)
01-Sep-2000   0.03   1200   11-Dec-1998   
02-Sep-2000   0.05   1000      NaN        

Input Arguments

collapse all

Numeric matrix to display, specified as numeric values for serial date numbers.

Data Types: double

(Optional) Date format, specified as a character vector. See datestr for available and default format flags.

Data Types: char

Output Arguments

collapse all

Character array representing the matrix, returned as an array. If no output variable is assigned, datedisp prints the array to the display.

Tips

This function is identical to the datedisp function in Financial Toolbox™ software.

Version History

Introduced before R2006a