Time consumed by a function in a code

1 回表示 (過去 30 日間)
Rashi Mehrotra
Rashi Mehrotra 2020 年 8 月 17 日
コメント済み: Rashi Mehrotra 2020 年 8 月 17 日
I have made an equivalent function of variable fractional delay and running it with a for loop and with the other functions like xcorr in the code. I have to find the time taken by the code in executing the equivalent function only and not the xcorr function. I have used tic toc, but it gives the time for the whole code.

回答 (1 件)

KSSV
KSSV 2020 年 8 月 17 日
Read about profiler. You can use tic toc.
t1 = tic ;
val = myfunction(inputs) ;
t1 = toc(t1) ;
  4 件のコメント
Rashi Mehrotra
Rashi Mehrotra 2020 年 8 月 17 日
there are two loops with vfd function and the time is growing as I am increasing the loop
Rashi Mehrotra
Rashi Mehrotra 2020 年 8 月 17 日
This gives an error TOC must be a uint64 scalar. Please resolve.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by