How can I merge 6 same-size vectors in simulink to obtain only one output?

Dear All,
I am seeking a block to produce only one output after merging 6 inputs, I expect to obtain the sum of the six inputs and form one vector. I attempted with "merge block", "vector concatenate block", and "Mux block" but unfortunately all of the produce an error. It is worth mentioning that the 6 inputs are "LookUp Tables"
This is the error message "Invalid connection from block 'ER_VGeoring/Scenario/6 buildings/Load Data 1-D Lookup Table 101' output port 1 to Merge block 'ER_VGeoring/Scenario/6 buildings/Merge' input port 1. An input signal to a Merge block must be connected and must originate from a conditionally executed subsystem that is not an Iterator subsystem"
Do you know another way to accomplish my target?
Best regards

2 件のコメント

Fangjun Jiang
Fangjun Jiang 2021 年 1 月 26 日
merge, concatenate, or mux all means different than "I expect to obtain the sum of the six inputs and form one vector". You need to clarify what you want. add [ 1 2 3] with [10 20 30] to get [11 22 33]?
Tony Castillo
Tony Castillo 2021 年 1 月 26 日
You are right, they are all different, but I just wanted mention what have I done before asking for help. I only want to obtain one single output from the sum of the six inputs in Simulink enviroment.

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

 採用された回答

Fangjun Jiang
Fangjun Jiang 2021 年 1 月 26 日

0 投票

The "Sum" block is all you need.

1 件のコメント

Tony Castillo
Tony Castillo 2021 年 1 月 27 日
Thank you for your help, it is a very effective and easy workaround.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Component-Based Modeling についてさらに検索

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by