Hi, Is there any way to use CVX in Simulink?
Thanks,
Sepideh
See CVX and Simulink Problem .
I think if you try to mix CVX and SIMULINK, you are on your own. But feel free to report any results if you try.
The suggestion is not to mix CVX and SIMULINK.
If you want to use CVX, don’t use SIMULINK. If you want to use SIMULINK, you’ll have to find something other than CVX. Perhaps you can try YALMIP https://yalmip.github.io/YALMIP-and-simulink/ and https://yalmip.github.io/example/simulink .
This is not the right forum for expertise in CVXGEN.
Googling CVXGEN SIMULINK shows some Q&A links, although I’m not sure they will help.
You could try contacting the CVXGEN developer, Jacob Mattingley. I don’t know whether CVXGEN is still being developed/maintained.
Anyhow, YALMIP might be your best option https://yalmip.github.io/example/simulink/ . You can get help at https://groups.google.com/forum/#!categories/yalmip .
I found a way around it. I ended up using interpreted MATLAB function in SIMULINK and call CVX by this block. It is working.
Hey @Sepideh_Kianbakht … did you used the function on run time of the simulation? Can you please elaborate the technique that worked for you.