本页面提供的是上一版软件的文档。当前版本中已删除对应的英文页面。
mean
算术平均值
不推荐使用 mean
。请改用 timetable
。有关详细信息,请参阅 将金融时间序列对象 fints 转换为时间表。
说明
示例
计算金融时间序列对象所有序列中所有数据的算术均值
创建一个
fints
对象。dates_and_times = (now:now+5)'
dates_and_times = 1.0e+05 * 7.3840 7.3840 7.3840 7.3841 7.3841 7.3841
tsobj = fints(dates_and_times, randn(6,1))
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see Convert Financial Time Series Objects (fints) to Timetables. > In fints (line 169)
tsobj = desc: (none) freq: Unknown (0) {'dates: (6)'} {'times: (6)'} {'series1: (6)'} {'07-Sep-2021'} {'12:30' } {[ 0.5377]} {'08-Sep-2021'} {'12:30' } {[ 1.8339]} {'09-Sep-2021'} {'12:30' } {[ -2.2588]} {'10-Sep-2021'} {'12:30' } {[ 0.8622]} {'11-Sep-2021'} {'12:30' } {[ 0.3188]} {'12-Sep-2021'} {'12:30' } {[ -1.3077]}
使用
log
计算自然对数。tsmean = mean(tsobj)
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see Convert Financial Time Series Objects (fints) to Timetables. > In fints/mean (line 22) tsmean = struct with fields: series1: 0.5648
输入参数
tsobj
— 金融时间序列对象
fints
对象
金融时间序列对象,指定为 fints
对象。
数据类型: object
输出参数
tsmean
— 金融时间序列对象中所有序列的所有数据的算术均值
结构体
金融时间序列对象中所有序列的所有数据的算术均值,以结构体的形式返回。
版本历史记录
在 R2006a 之前推出
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)