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 次查看(过去 30 天)
显示 更早的评论
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?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!