How to restore buffer size in Simulink?

4 次查看(过去 30 天)
I want to make a Simulink block that rebuffers an input signal (e.g. from length 16 to 128), then does some calculations, and then outputs something that has the original buffer size (so back to 16). Is it possible to get the original input size (e.g., with Width) and give it as an input to the Buffer function? Or is there another way to achieve this?
Thanks in advance!
Benjamin
  4 个评论
Daniel M
Daniel M 2019-10-18
Well it's not clear what your calculations were supposed to be. Anyways, you can set the buffer size using a variable defined in the Matlab workspace. Other than that, I'm afraid I can't be of more help.
Benjamin Dieudonné
Benjamin Dieudonné 2019-10-23
So the purpose was to make a generic library block that can handle different input buffer sizes, and that always gives the same output buffer size as input buffer size. However, in the block, a STFT analysis is done. To achieve that, the signal is rebuffered according to the desired window length, and in the end, it should be rebuffered again to the original buffer size...

请先登录,再进行评论。

回答(0 个)

产品


版本

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by