ma.m
来自「Neural Network in Finance (神经网络在金融界:赢得预言」· M 代码 · 共 12 行
M
12 行
function s=ma(y,wind)
%MA MA(Y,WIND) is the moving average smoother of Y with
% window width WIND. Default for WIND is 5.
y = y(:);
if nargin < 2, wind = 5; end;
[m n] = size(y);
if m < wind, disp('Window wider than sample'); return; end;
s = cumsum( [sum(y(1:wind)); y(wind+1:m)-y(1:m-wind)] )./wind;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?