Matlab hangs up when using the "print" command to export figures
조회 수: 10 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (3개)
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.
rachael
2017년 8월 31일
I’m running into the same problem when remote connecting to a Linux machine.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178026/image.png)
Did you ever figure out the problem or a work around? The command I’m using is:
print(‘-dpng’,’-r300’,[’figure text plus’ num2str(a number)]);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!