MATLAB Answers

How to measure time that fmincon takes to extract one solution from a NMPC running in Simulink

2 views (last 30 days)
Christos Patrinos
Christos Patrinos on 19 Jun 2020
I am running a Non-linear MPC at Simulink and I would like to know if it is possible to measure the computational time it takes for the fmincon to generate a solution for the controller per simulation time step. I have seen commands like tic/toc, cputime etc, but my issue is that I don't know a way that I could go "under the hood" and put these commands before and after fmincon.
If somebody knows, could you please help me?

Answers (0)

Community Treasure Hunt

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

Start Hunting!