Skip to content

Conversation

@alexandre-faye
Copy link

Adds the update_Q_A method to the MATLAB MEX interface since I use it a lot.
This code works in my limited testing for my limited use-case.

Add the update_Q_A method to the MATLAB MEX interface
Turns out, my previous proposal behaved badly when zeros were introduced in (or removed from) the matrices. This fixes it.
Replacing the remaining tabs with 4x space
@tttapa
Copy link
Collaborator

tttapa commented Mar 14, 2025

Thanks a lot for the contribution!
I'll have a detailed look and merge it next week.

@alexandre-faye
Copy link
Author

I should precise something, if you still plan on doing the review: I implemented the MATLAB interface such that it takes whole matrices (either dense or sparse), whereas the C/C++ interface needs the upper diagonal coefficients of Q.

I feel like it fits the MATLAB style more, but it is sort of inconsistent with the other interfaces. For reference, the MATLAB OSQP interface requires the upper diagonal coeffs, but their update function is a bit different (in the lines of solver.update('Qx', Q_coeffs)).

In the end I also did this because it felt more fit to my use-case, but I'm open to doing it differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants