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!