Accessing data from simulink to Matlab workspace

1 回表示 (過去 30 日間)
David Lopez
David Lopez 2021 年 9 月 27 日
Hi,
I am trying to retrieve my data coming from simulink to plot it and perform some processing on it.
My test example is a 10 MHz /0.5 V discretized sinusoid exported to the workspace (sampling frequncey 80 MHz/100 sample per frame during a 1e-4 sec. simulation.
here the example and the configuration of the blocks - source and export:
when I look to the exported variable "sin"
struct with fields:
time: [81×1 double]
signals: [1×1 struct]
blockName: 'access_data_from_simulink/To Workspace'
I understand 81 as the number of frames
when I look the signals structure
I have
struct with fields:
values: [100×1×81 double]
dimensions: [100 1]
label: ''
I wanted to plot my sinusoid on an time axis from 0 to 1e-4 s. and perform a fft on it and have my dirac frequency at 10 MHz...
I admit the notion of frame for me is not very clear...
I have tried a lot of things but none is working...
an idea ?
thanks for your time

回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Attributes and Indexing についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by