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

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

 Réponse acceptée

0 votes

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

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!