Tic Toc Equivalent for Simulink
조회 수: 22 (최근 30일)
이전 댓글 표시
I am trying to understand how long different portions of a complex simulation are taking in real world time. In MATLAB, I would use Tic Toc to time and analyze different portions of my code. How can something similar be done in Simulink?
- I want to be able to drop this block at different points in my schematic and save the real world timestamp every time the solver reaches that point in the code (Not needing an initialization block would be ideal)
- Each block put into the schematic must be labelled with an assigned variable
- Time information for each block should probably be written to a File, maybe to the Workspace
- Basically, looking for a method to "Flag" real world time at different points in my schematic
댓글 수: 1
Walter Roberson
2019년 9월 16일
In the particular case of Simulink Desktop Real-Time, see https://www.mathworks.com/help/sldrt/ug/execution-time-measurement-and-block-profiling.html
Otherwise, there are some possibilities at https://www.mathworks.com/matlabcentral/answers/30479-how-to-get-system-date-and-time-into-simulink and more modern at https://www.mathworks.com/matlabcentral/answers/439015-get-unix-standard-timestamp-on-matlab
답변 (1개)
Monika Jaskolka
2019년 9월 26일
If you want to "tic toc" an entire model, there is this script on the File Exchange (full disclosure, I am the author): https://www.mathworks.com/matlabcentral/fileexchange/72854-model-execution-time
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!