www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ReturnOnlyFullWindowStandardDeviationsExample.m

    %% Return Only Full-Window Standard Deviations
% Compute the three-point centered moving standard deviation of a row
% vector, but discard any calculation that uses fewer than three points
% from the output.  In other words, return only the standard deviations
% computed from a full three-element window, discarding endpoint
% calculations.

A = [4 8 6 -1 -2 -3 -1 3 4 5];
M = movstd(A,3,'Endpoints','discard')