How can I convert matlab plots/graphs to jpeg file?
조회 수: 2 (최근 30일)
이전 댓글 표시
The code below plots my desired graph; however, when exported to Word document and printed, it looks faint.Please how do I improve on it?
% Multi-Mittag_Leffler Function
t =-50:10:10;
n=0:60;
for j =1:length(t)
E2(1, j) = sum((t(j).^n)./gamma(2*n + 1))
E10(1, j) = sum((t(j).^n)./gamma(10*n + 1))
E5(1, j) = sum((t(j).^n)./gamma(5*n + 1))
E1(1, j) = sum((t(j).^n)./gamma(n + 1))
end
plot(t,log(E1), t,log(E2), t,log(E5) , t,log(E10))
xlabel('t values')
ylabel('f(x) =E(t)')
title('Mittag_Leffler Function E(t) for different alpha, beta=1')
legend('E1', 'E2', 'E5', 'E10')
댓글 수: 0
채택된 답변
Akshay
2014년 7월 21일
To save your figure as a graphics format file, specify a format switch and file name. To set the resolution of the output file for a built-in MATLAB format, use the -r switch. (For example, -r300 sets the output resolution to 300 dots per inch.) The -r switch is also supported for Windows Enhanced Metafiles, JPEG, TIFF and PNG files, but is not supported for Ghostscript raster formats.
Use the following code snippet to export Figure No. 2 at a resolution of 300 dpi to a 24-bit JPEG file, myfigure.jpg.
>> print -djpeg -f2 -r300 myfigure
To gain more insight refer the documentation link for Printing and Exporting and Printing the Use Cases.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!