- Add an 'Outport' block connect the voltage signal to it.
- Then, configure the "Data Import/Export" in the "Model Configuration Parameters" to save time and voltage in the base workspace by checking Time and Output checkbox, also change "Format" to "Array".
- In MATLAB convert the arrays into a table by:
How to save the graph obtained with Simulink's scope as numerical data
조회 수: 4 (최근 30일)
이전 댓글 표시
채택된 답변
Epsilon
2024년 9월 25일
편집: Epsilon
2024년 9월 25일
To export the voltage and time, use the 'outport' block to save the data in the MATLAB base workspace and then convert them into a table.
waveformTable=table(tout,yout)
%tout and yout are the default variable names defined while configuring "Data Import/Export".
Note: Model needs to be pre-configured to have a sampling time of 0.001 seconds as the sampling time depends on the parameters passed in the block used.
Link to documentation on Outport: https://www.mathworks.com/help/simulink/slref/outport.html
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!