How to access logged data from Simulink.SimulationOutput object by name (instead of {index})?
18 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I know when I log multiple signals from a Simulink simulation and stored the Simulink.SimulationOutput object in the variable "out", I can select a specific signal by writing
elements = out.logsout{1}.Values;
But is there also a way of using the name of the signal instead of the index? (I use Matlab 2022b.)
Then it would not be necessary to first check which index was assigned to which variable.
Just to clarify, when I open the logsout of the Simulink.SimulationOutput instance, in the highlighted column are the names I mean:
Thanks in advance for all helpful answers!
0 件のコメント
回答 (2 件)
Nitya Patel
2023 年 6 月 22 日
You can use the find method to do so, here is the documentation for the same: Simulink.SimulationOutput.find.
Haroon Zafar
2023 年 12 月 5 日
編集済み: Haroon Zafar
2023 年 12 月 5 日
Use get method.
headind_dev_data= get(out(1,1).logsout,"heading_dev")
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Prepare Model Inputs and Outputs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!