フィルターのクリア

Simulink Export Variable List

5 ビュー (過去 30 日間)
Semaj Kazam
Semaj Kazam 2024 年 2 月 29 日
回答済み: T.Nikhil kumar 2024 年 3 月 14 日
I am trying to Export variables in a block to a list, inputs and outputs for use in another program.
This should be simple, yes? Export is greyed out.
I also tried to use Find Referenced Variables and get an error.
What is the best way to output a list of variables, excluding commands? Tutorial does not show this.

回答 (1 件)

T.Nikhil kumar
T.Nikhil kumar 2024 年 3 月 14 日
Hello Semaj,
Based on your question, I can comprehend that you want to obtain a list of a Simulink block's inputs and outputs.
I would suggest you to try the below mentioned methods which may help you:
  • You can try using the ‘To Workspace’ Simulink block to log both input and output data into the workspace. This data in workspace can then be converted to required format.
  • "Export" is generally greyed out when there are no variables in the workspace. Try right-clicking on the model’s name and select ‘Find Referenced Variables’. Then select all the variables and export selections to a .mat file.
  • The error regarding failure in compiling on using ‘Find Referenced Variables’ could be due to some unresolved issues in the model. Ensure that your model is correctly set up and that all errors in Diagnostic Viewer are resolved.
  • If your goal involves exporting simulation data (i.e., the outputs of your model over time), then the Simulink Data Inspector provides a straightforward way to export such data. Use it instead of the Model Explorer to log variables:
  1. Run your simulation with logging enabled for every input and output signal of the block.
  2. Open the Simulink Data Inspector from ‘Review Results’ section in ‘Simulation’ Tab.
  3. Use the export functionality within the Data Inspector to save the data to the workspace or a file.
Refer to the following documentation for more details:
Hope this helps you proceed further!

カテゴリ

Help Center および File ExchangeLarge-Scale Modeling についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by