dateseries(dateStar​t,dateEnd,varargin)

版本 1.2.0.0 (9.8 KB) 作者: Toby
% Generates a vector of dates over the interval [dateStart:dateEnd].
44.0 次下载
更新时间 2017/3/7

查看许可证

% Generates a vector of dates over the interval [dateStart:dateEnd].
% Inputs dateStart, dateEnd can be strings (of format accepted by datenum() function), or Matlab serial dates.
% Output vector can be of two different types: cell array of strings, or Matlab serial dates.
%
% syntax: v = dateseries(dateStart,dateEnd)
% v = dateseries(dateStart,dateEnd,'parameter','value',...)
%
% optional parameters:
% Interval (string) - Interval between indeces of the output vector: 'daily', 'weekly', 'monthly', or 'quarterly'.
% Defaults to 'daily'.
% OutputType (string) - Data type of the output vector: 'string' or 'serial'
% Defaults to 'string'.
% OutputFormat (string) - Format of the output vector (for a cell array of strings).
% Should allow any format supported by datestr() function.
% Defaults to 'mm/dd/yyyy'.
% Day (string / integer) - Filters output vector to specified days: 'all' or 'weekdays' for 'daily, 'monthly', 'quarterly' intervals.
% Specific day of week 'Mon','Tue',etc for 'weekly' interval.
% Or numeric value for every nth day of 'daily' interval.
% Defaults to 'all'.
% DayInInterval (string / integer) - Filters ouptut vector to specified day
% in interval: 'start' or 'end', for 'monthly' and 'quarterly' intervals
% or numeric value for 'monthly' intervals (e.g. 15th of every month).
% Defaults to 'end'.
%

引用格式

Toby (2024). dateseries(dateStart,dateEnd,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/61921-dateseries-datestart-dateend-varargin), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.2.0.0

Updated comments.

1.1.0.0

Updated comments.

1.0.0.0