Closed jasonnicholson closed 1 year ago
You need to have MataveControl installed.
The reason why I have an own quadratic programming solver, is because there is a 100% eqvivalent QP-solver at CControl for embedded systems.
Okay. I got it now. Replace quadprog
with mc.quadprog
.
Also linprog.m should be vectorized because it's to slow. I made it like that because there is also a linprog.c that using exactly the same algorithm and gives the same results back.
Sometimes linear programming can be useful for Model Predictive Control.
https://github.com/DanielMartensson/Mataveid/blob/7b4630798bb019d8b0085f0f36d7e6cc697c839b/sourcecode/lsvm.m#L59
In MATLAB,
quadprog
is in the Optimization Toolbox. I would recommend adding some code that checks for the Optimization Toolbox before making this call.