フィルターのクリア

Unknown Data Type from Simulink and I don't know how to access the values from it.

2 ビュー (過去 30 日間)
Rees Hatch
Rees Hatch 2018 年 5 月 18 日
コメント済み: Rees Hatch 2018 年 5 月 18 日
Hi all,
I am logging 3 different signals on a Simulink scope and logging the data to the workspace by saving it as a Struct with Time. The struct has another struct within it called 'signals'. The signal struct has a data type called 'values' that I am not familiar with that looks like this.
Can someone please explain this data structure and how I access each of the 3 vectors within it individually.
Thanks!
  2 件のコメント
Walter Roberson
Walter Roberson 2018 年 5 月 18 日
What shows up for class() of the values field? I suspect it is cell array.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 5 月 18 日
It appears from https://www.mathworks.com/help/sldrt/ug/plot-signal-data-logged-to-workspace.html that you probably have a non-scalar struct. Try looking at
first_signal = ScopeData.signals(1).values;
second_signal = ScopeData.signals(2).values;
third_signal = ScopeData.signals(3).values;

カテゴリ

Help Center および File ExchangeView and Analyze Simulation Results についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by