필터 지우기
필터 지우기

Simulink - store signal and output as vector

조회 수: 7 (최근 30일)
Tamar
Tamar 2023년 7월 10일
댓글: Tamar 2023년 7월 11일
I want to store a signal until time that I will define and than get the values which receive from the signal as vector
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2023년 7월 10일
??
Tamar
Tamar 2023년 7월 11일
Let’s say all my running time it’s 10 sec and I want values of signal as vector every 2 sec

댓글을 달려면 로그인하십시오.

답변 (1개)

Manas
Manas 2023년 7월 11일
Hi Tamar,
You can save data from Simulink to a MAT-file using the To File block. To save it as an array, specify the Save format parameter as Array. Further, you can specify the sample period and offset at which to collect data points using the Sample time parameter.
You can also consider writing the input signal data to a workspace using the To Workspace block, however the data will not be available until the simulation pauses or stops.
  댓글 수: 1
Tamar
Tamar 2023년 7월 11일
Thank you so much!!! If I use ‘to file’, how can I read the data back to the simulink? I can’t use ‘from file’ block because the file has the same name…

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by