movingstd & movingstd2
Occasionally I see a request for computation of a running, windowed standard deviation. This is easily accomplished using filter and the alternative formula for the standard deviation:
std = sqrt((sum(x.^2) - n*xbar.^2)/(n-1)).
movingstd allows you to specify forward, backward or central windows of any desired length. It patches the ends, shortening the window as necessary.
movingstd2 is now included, allowing a moving window standard deviation on 2-dimensional arrays. (I suppose I could easily enough implement movingstdn if that becomes of interest.)
引用格式
John D'Errico (2024). movingstd & movingstd2 (https://www.mathworks.com/matlabcentral/fileexchange/9428-movingstd-movingstd2), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- FPGA, ASIC, and SoC Development > Vision HDL Toolbox > HDL-Optimized Algorithm Design >
- Image Processing and Computer Vision > Vision HDL Toolbox > HDL-Optimized Algorithm Design >
标签
致谢
启发作品: slidefun
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!