How to get X and Y values from a Scope Graph

10 ビュー (過去 30 日間)
braghettos
braghettos 2011 年 12 月 1 日
Hi everyone! I'm trying to obtain values of a scope plot to obtain two columns of X and the corrispondent Y value to plot a graph on Excel. Does anyone know how to do it?
Thank you in advance! I need it for my thesis

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 12 月 1 日
Click the second buttons on the "Scope" block to access the scope parameters. Click the "Data history" tab, check "Save data to workspace". Assume you use the default name "ScopeData", choose "Structure with time" for the format.
Once your simulation is done, go to MATLAB Command Window,
ScopeData.time will be the time vector and ScopeData.signals.values will be the signal values.
  2 件のコメント
braghettos
braghettos 2011 年 12 月 1 日
Thank you so much! Now is there a quick way to export this columns, ie in a txt file?
Fangjun Jiang
Fangjun Jiang 2011 年 12 月 1 日
csvwrite('test.csv',[ScopeData.time ScopeData.signals.values])

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by