应用于金融领域的时间表的常见操作
清理数据、重采样和聚合数据、合并时间表以及同步日期
函数
清理数据
ismissing | 查找缺失值 |
rmmissing | 删除缺失的条目 |
fillmissing | 填充缺失条目 |
sortrows | 对矩阵行或表行进行排序 |
retime | 重采样或聚合时间表中的数据,并解决重复或不规则时间问题 |
重采样和聚合数据
retime | 重采样或聚合时间表中的数据,并解决重复或不规则时间问题 |
convert2daily | Aggregate timetable data to daily periodicity (自 R2021a 起) |
convert2weekly | Aggregate timetable data to weekly periodicity (自 R2021a 起) |
convert2monthly | Aggregate timetable data to monthly periodicity (自 R2021a 起) |
convert2quarterly | Aggregate timetable data to quarterly periodicity (自 R2021a 起) |
convert2semiannual | Aggregate timetable data to semiannual periodicity (自 R2021a 起) |
convert2annual | Aggregate timetable data to annual periodicity (自 R2021a 起) |
合并时间表并同步数据
synchronize | 将时间表与公共时间向量同步,并对输入时间表中的数据进行重采样或聚合。 |
horzcat | 水平串联数组 |
vertcat | 垂直串联数组 |
处理时间表中的数据
rowfun | Apply function to table or timetable rows |
splitapply | 将数据划分归组并应用函数 |
findgroups | 查找组并返回组编号 |
主题
- 在时间表中选择时间
使用
timerange
或withtol
函数,或通过匹配行时间的日期或时间组成部分,从时间表中选择行时间。使用retime
函数对所选时间表数据进行重采样或分组。 - 对时间表中的数据进行重采样和聚合
对时间表中的数据重采样或将数据聚合到一个新的行时间向量中。
- 合并时间表并同步其数据
通过串联或将时间表数据同步到公共时间向量来合并时间表。
- 清理包含缺失、重复或不均匀时间的时间表
清理包含缺失、重复或不规则时间的时间表,并生成规则时间表。
- 使用时间表处理金融数据
使用时间表根据模拟的每日股票数据可视化和计算每周统计数据。
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)