How to use fmincon inside a level-2 matlab function in Simulink external mode?

1 回表示 (過去 30 日間)
Lorenzo Scalera
Lorenzo Scalera 2020 年 5 月 16 日
Hi everybody,
I am trying to use fmincon inside a level-2 matlab function in Simulink real-time, using external mode.
Unfortunately, I got an error since the corresponding .tlc file is not found.
The corresponding 'test_opt_fun.tlc' file for the MATLAB S-function 'test_opt_fun' in block 'test_opt/MATLAB file (level-2) S-Function' must be located in the current working directory, the MATLAB S-function directory 'C:\Users\...\test_level2_matlabfun', or the directory 'C:\Users\...\test_level2_matlabfun\tlc_c'
How can I solve the problem? Is there a way to make Simulink automatically generate the .tlc file?
Or is there any other workaround to be able to use fmincon in Simulink real-time (external mode)?
Thank you very much in advance.
Best,
Lorenzo

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by