How can I convert matlab plots/graphs to jpeg file?

3 次查看(过去 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')

采纳的回答

Akshay
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 CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by