Get function output and time from timit

조회 수: 2 (최근 30일)
Sndn_Shr
Sndn_Shr 2018년 1월 20일
댓글: Sndn_Shr 2018년 1월 20일
I have functions I need to time, which returns a single output. All functions are in separate files. How do I get that returned output when using timeit?
So far I have used tic,toc. But want to use timeit from now on.

채택된 답변

Walter Roberson
Walter Roberson 2018년 1월 20일
You cannot get the actual function output from timeit.
You can look in the File Exchange for the code for timeit and modify that code to suit your needs.
Remember that timeit runs the code a variable number of times.
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 1월 20일
Read the documentation. It clearly says that timeit runs the code several times and takes the median.
Sndn_Shr
Sndn_Shr 2018년 1월 20일
Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by