MATLAB Answers

Is the Moving Variance block in Simulink vectorised?

6 ビュー (過去 30 日間)
David Wilson
David Wilson 2019 年 10 月 8 日
回答済み: Abhishek Kumar 2020 年 9 月 29 日
I'm using the Moving Variance block in Simulink and it seems to be giving unexplained results for vectorised (muxed) inputs. My Simulink model is given below. I generate a random signal with power =1 (which equates to a variance of 1). I simulate for 10,000 samples and use a long window in the moving average block of 1000 so I should get the expeced variance (within a very small tolerance). As seen below in the middle case where I multiply the signal by 2, the varianace should change to 4, but it does not, nor does the variance of the straight signal (but it's OK in the block above). It seems that the vectorising is mucking up the calculations, but the help file seems to indicate that this should be acceptable.
movVar.PNG

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Abhishek Kumar
Abhishek Kumar 2020 年 9 月 29 日
As per my understanding you are trying evaluate functioning of moving variance block, your assessment is correct but it is not mucking up, using mux provides a vector of two inputs thus moving variance results in respective output.

  0 件のコメント

サインインしてコメントする。

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by