How to measure function execution time in simulink inside a matlab function block

4 ビュー (過去 30 日間)
ludolfusexe
ludolfusexe 2024 年 12 月 11 日
回答済み: ludolfusexe 2024 年 12 月 11 日
How to measure function execution time in simulink inside a matlab function block?
Simulink restricts using tic and toc and I need to log the execution time of the quadprog() function inside the matlab function block.
I appreciate any suggestions.

採用された回答

ludolfusexe
ludolfusexe 2024 年 12 月 11 日
Using
t1 = tic();
t_elapsed = toc(t1);
instead of
tic();
t_elapsed = toc();
seems to solve the problem.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by