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

4 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

ludolfusexe
ludolfusexe am 11 Dez. 2024
Using
t1 = tic();
t_elapsed = toc(t1);
instead of
tic();
t_elapsed = toc();
seems to solve the problem.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by