Saving structure data type in Simulink

12 ビュー (過去 30 日間)
Nishant Kumar
Nishant Kumar 2020 年 3 月 29 日
回答済み: Dhananjay Kumar 2020 年 3 月 31 日
I have a MATLAB Function block from which I need to save 10 variables to a file. Every variable has different size. I thought of taking advantage of structure data types. But not been able to save the structure with help of 'To File' block. Moreover, 'save()' function also can't be used in the matlab function block.
Is there any other way I can do that.
Or any way to store all 10 variables in same .mat file.
  3 件のコメント
Dhananjay Kumar
Dhananjay Kumar 2020 年 3 月 31 日
編集済み: Dhananjay Kumar 2020 年 3 月 31 日
You want to save the structure or overwrite it?
Nishant Kumar
Nishant Kumar 2020 年 3 月 31 日
Any method would do but I would like to overwrite it.

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

回答 (1 件)

Dhananjay Kumar
Dhananjay Kumar 2020 年 3 月 31 日
Try one of these:
2) Export Workspace Variables through model explorer
3) assignin function
4) evalin function

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by