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 CenterFile Exchange에서 Signal 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