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

4 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by