Azzera filtri
Azzera filtri

Matlab hangs up when using the "print" command to export figures

10 visualizzazioni (ultimi 30 giorni)
Hi,
Matlab hangs up when using the "print" command to export figures. I can not interrupt the software and I have to kill the process.
My script makes simple 3d graphics and uses some additional functions written by me. What is weird is that the problem is systematic, however, the same functions, used to generate ather plots, do not causes any problem. The problem arises with the print command, no matter the option used. Matlab goes in "Busy" state but it allows me to, e.g., edit the script.
I tried to add before/after the print command the pause and/or drawnow commands but without success as suggested here (<http://undocumentedmatlab.com/blog/s...b-hang-problem)>.
uname -a
Linux laresa 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 8.3.0.532 (R2014a)
MATLAB License Number: ••••••
Operating System: Linux 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
Any help is welcome g.

Risposte (3)

Jonathan
Jonathan il 11 Gen 2017
I have the same problem, using Matlab2016b on an iMac (OS 10.12.2). It happens for high-resolution images but not lower resolution images. Is there a way to test for when an image is too large to print without causing Matlab to hang?
It does not appear to be a RAM issue. Matlab is using 1.2 GB and there is plenty of RAM free.
  1 Commento
g. a.
g. a. il 11 Gen 2017
not related to resolution in my case. i tried with options -r100 and -r10 (default is -r150) and get stacked as well. g.

Accedi per commentare.


rachael
rachael il 31 Ago 2017
I’m running into the same problem when remote connecting to a Linux machine.
Did you ever figure out the problem or a work around? The command I’m using is:
print(-dpng,-r300,[figure text plusnum2str(a number)]);

pablo salinas
pablo salinas il 22 Feb 2018
set(gcf,'renderer','zbuffer');
print('-dpng','-r80','out.png');

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by