I have found the solution. Ubuntu Server requires three extra libraries to allow MATLAB to plot graphs without crashing. I needed to install libgl-mesa-glx, libglu1-mesa and libxrandr2. Invisible plots can now be created and saved without MATLAB crashing.
From within a Java program, how do I make a MATLAB call (via a function built with Compiler SDK) that is headless, so that an invisible figure can be saved as a jpg without MATLAB crashing?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
My main program is Java and this makes calls to MATLAB via the Compiler SDK. This mechanism works fine. One particular MATLAB function creates an invisible plot and saves a jpg using saveas - I create the new plot with figure('visible', 'off'). When I run in my development environment, this works very well. However, when I deploy to a field processor running Ubuntu server and MATLAB MCR R2015A, MATLAB crashes with a segmentation violation (which appears to be graphics related).
I know MATLAB can be called with command line arguments to make it headless. How can this be done when function calls to MATLAB are made from within Java?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!