フィルターのクリア

How to safe data from multiple "To Workspace " blocks in one Matrix

1 回表示 (過去 30 日間)
Dan
Dan 2023 年 5 月 22 日
Hi!
In my Simulink project I have multiple "To Workspace" blocks which are writing the outputs in multiple Arrays. However, I would like to have only one Matrix with all data from all the "to workspace" blocks, so that each block has its own row in the matrix. I can't build a matrix with all the output vectors at the end, because the simulation has to access the current latest element of the arrays (the last element of each row of the matrix).
Thanks for your help!

採用された回答

Selena Mastrodonato
Selena Mastrodonato 2023 年 5 月 22 日
Hi Dan, If I have understood correctly, you want solve the issue on simulink and not in post processing on MATLAB. In this case, if you have row vectors with same lenght and data type, you can consider using a Mux block and send the outport of Mux block to a To workspace block.
  2 件のコメント
Dan
Dan 2023 年 5 月 22 日
That worked! Thank you so much!
Selena Mastrodonato
Selena Mastrodonato 2023 年 5 月 22 日
Good luck Dan with your project 😎

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by