Skip to content

Conversation

@stefphd
Copy link
Contributor

@stefphd stefphd commented Oct 15, 2025

Hi Charlie,

I've just written a first draft of the MATLAB interface. It has also some minor changes in the C/C++ interface. For now it's only a draft, may be unstable at the moment.

Track list:

  • Create low-level matlab mex functions result = uno_optimize(model[, options, callbacks]) and options = uno_options([preset])
  • Create readme for matlab interface
  • Create HS015 problem example
  • Use explicit sparsity pattern in matlab low-level interface
  • Add argument validation functions in interfaces\Matlab\Uno_mex_utilities.hpp
  • Add argument validation inuno_optimize mex function
  • Add high-level (fmicon-like) interface
  • Add github action (Windows)
  • Add github action (MacOS)

@cvanaret
Copy link
Owner

cvanaret commented Oct 16, 2025

Really cool Stefano!
Do we need a self-hosted runner with a Matlab license to test the interface in a Github Action or can we do that on the Github runners?

@stefphd
Copy link
Contributor Author

stefphd commented Oct 16, 2025

Hi @cvanaret

As far I know, it's possible to use Matlab on the Github runners for public repos, so no need for self-hosted runners (see here). So far, I was able to build a Matlab mex (via cmake) even for a private repo without a Matlab license, as this step only requires the Matlab installation and doesn’t actually call MATLAB itself. I’ll try running a test on GitHub runners to confirm that this works as well.

@cvanaret
Copy link
Owner

The Github action runs, well done 🥳

@stefphd stefphd changed the title First draft of MATLAB interface (WIP) [WIP] MATLAB interface Oct 24, 2025
@cvanaret
Copy link
Owner

@stefphd sorry for the many changes we're merging into main 😅 Let me know if you need anything.

# optional Matlab bindings #
############################

find_package(Matlab COMPONENTS MAIN_PROGRAM MEX_COMPILER)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you've verified this works with a particular matlab version I'd recommend pinning it on that version. There have been several minor changes in the mex behaviour over the past couple of versions that could cause unnecessary heartache.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants