有一组一维数组想要以​2000为窗口,窗口​移动步长为100计算​方差该如何实现?。

有一组一维数组想要以2000为窗口,窗口移动步长为100计算方差该如何实现?

 Respuesta aceptada

0 votos

A=rand(1,3000);
ind=[1:100:length(A)-1999]+[0:1999]';
res=var(A(ind));

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!