MATLAB Answers

Output from simulink to matlab file append each run

3 ビュー (過去 30 日間)
Aly Elhefny
Aly Elhefny 2020 年 6 月 19 日
回答済み: Chaitanya Mallela 2020 年 10 月 21 日
Hello everyone,
Please I need to the output from my (to file) simulink block to be append to the .mat file. So for example the first time simulation runs and finishes the output is saved to the first row and then the second time the simulation runs and finishes output should be saved to second row and so on.
Thanks !

  0 件のコメント

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

回答 (1 件)

Chaitanya Mallela
Chaitanya Mallela 2020 年 10 月 21 日
To file block overwrites the variable every time when simulated. To append the data row wise after every simulation either you can log the data and introduce a short script to append in a single .mat file or create an output port instead of To file block and append the data using callback functions.

  0 件のコメント

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by