Dear Mélodie,
Can you please tell us what operating system you are using? Also, which version of Knitro 12 are you using (e.g., 12.0, 12.1, 12.2, etc.)? Have you tried using the MATLAB "addpath" function to make sure it can find the location of "knitro_nlp.p" in the knitromatlab
directory? We are not aware of any issues using knitro_nlp with R2023b, but we will investigate.
Knitro 12 is pretty old at this point. It is highly recommended to update to the latest
version if you are able to, as there have been many bug fixes and performance improvements since Knitro 12. In addition, the latest versions of the Knitro/MATLAB interface support the new MATLAB "problem-based" API,
which offers many advantages, such as automatic derivatives and easier problem setup.
Regards,
Richard Waltz