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

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.

 Respuesta aceptada

Using
t1 = tic();
t_elapsed = toc(t1);
instead of
tic();
t_elapsed = toc();
seems to solve the problem.

Más respuestas (0)

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Versión

R2023a

Preguntada:

el 11 de Dic. de 2024

Respondida:

el 11 de Dic. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by