How can I measure the processing time of MATLAB Function Block?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi, All.
As the below image, I created a MATLAB function block and want to measure its processing time (not the whole simulation time).
Thank you for your help in advance.
댓글 수: 0
답변 (1개)
Easwar Kumar Yarrabikki
2019년 3월 11일
Can you try putting a tic in the begining of your MATLB code and toc at the end of your code.
function time_taken= example_test_function()
tic
your code
time_taken=toc;
This should hopefully give you the time taken for each iteration. incase if MATLAB code generator complaints about tic and toc usage in MATLAB fnction, try Coder.extrensic to aviod code gen issues.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 String에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!