Interleaving vectors in simulink

1 回表示 (過去 30 日間)
Ottar Gislason
Ottar Gislason 2021 年 5 月 25 日
回答済み: Tarunbir Gambhir 2021 年 5 月 28 日
Hi all,
I have two vectors in simulink which I want to merge into a single one. These vectors do not have the same length, the ratio is 10:1.
Example:
Vector1 =
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Vector2 =
2 2
I want to interleave one value of the short vector for each ten of the long one:
DesiredVector =
1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2
Is there any block in Simulink which achieves this?
Thanks

回答 (1 件)

Tarunbir Gambhir
Tarunbir Gambhir 2021 年 5 月 28 日
I am not sure if there exist a block that specifically does this. However, this task can be done easily by creating a custom MATLAB function block.

カテゴリ

Help Center および File ExchangeInterleaving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by