Simulink tapped delay block with vector inputs

조회 수: 33 (최근 30일)
Sean
Sean 2025년 3월 13일
댓글: Sean 2025년 8월 12일 14:06
All,
I have often needed a "shift-register" function in Simulink that can accept vector inputs. The tapped delay only supports scalar inputs. I typically build this function using the "Matlab Function" block.
How do other people solve this problem? Is there a built-in solution I am not aware of?
Maybe someone from MathWorks is reading these questions? It is a pretty big gap that there is no built-in way to build a shift register with vectors.
Thanks.

채택된 답변

Vanita
Vanita 2025년 8월 12일 10:18
Hi Sean,
To build a shift register block with vector input in Simulink, the Delay Line block from the DSP System Toolbox is a good option. This block supports vector inputs and can implement a shift register by delaying the input signal by a set number of samples. You can refer to the following document for more details:
Hope this helps!
  댓글 수: 1
Sean
Sean 2025년 8월 12일 14:06
I was unaware that the Delay Line block might work. I am not in a position to test it, but I appreciate the information. Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

praguna manvi
praguna manvi 2025년 3월 17일
Hi @Sean,
The "Tapped Delay" block natively accepts only scalar inputs. A workaround to pass vector inputs is to use a "Buffer" block, setting the "Overlap" property to one less than the buffer size. Here is a useful discussion thread on a similar use case:
For more information on the "Buffer" block, refer to the following link:
  댓글 수: 1
Sean
Sean 2025년 3월 17일
Thanks for the response.
There are two problems with using the buffer block:
  1. The sample rate changes. This isn't always what you want.
  2. This block is not compatible with some of the codegen tools (the HDL coder, for example).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Measurements and Statistics에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by