필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Differences in filesize if matlab runs in background

조회 수: 1 (최근 30일)
jan mischke
jan mischke 2015년 11월 5일
마감: jan mischke 2015년 11월 6일
I just recognized a strange behaviour of matlab. I got two script that create three .png files with print (script1 creates png1 and script2 creates png2 and png3). If I run them both manually in matlab the files that are created are 175KB, 4xxKB and 4xxKB big. If I use matlab in the background with
matlab -nodisplay -r "run('script1.m');run('script2.m');exit;
then my the filesize is changed. png1 is 281KB but png3 is over 1,4mb big...Where could this come from? Both scripts use exactly the same print command:
fig = gcf;
fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 15 9];
fig.PaperPositionMode = 'manual';
fname = ['Energy_resolved',num2str(k)];
set(gcf,'Visible','off');
print(['-f',],'-dpng','-r0','r300',fname);
close(gcf);
The only difference is that in the second script I use a for loop to create two pictures instead of one picture in the first script, but still that does not describe the difference between calling the script manually in matlab and in the command line in the background, or does it?
EDIT: I just recognized that even the pictures look different if I plot them IN matlab or with matlab in the background. If I run it in the background my curves are not curvy but edgy (and the file size almost doubles or even tripples). So what do I miss here?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by