필터 지우기
필터 지우기

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

조회 수: 10 (최근 30일)
g. a.
g. a. 2017년 1월 8일
댓글: g. a. 2018년 2월 23일
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.

답변 (3개)

Jonathan
Jonathan 2017년 1월 11일
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
g. a.
g. a. 2017년 1월 11일
not related to resolution in my case. i tried with options -r100 and -r10 (default is -r150) and get stacked as well. g.

댓글을 달려면 로그인하십시오.


rachael
rachael 2017년 8월 31일
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 2018년 2월 22일
set(gcf,'renderer','zbuffer');
print('-dpng','-r80','out.png');

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by