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

3 ビュー (過去 30 日間)
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics 2014 年 7 月 21 日
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.
  1 件のコメント
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics 2014 年 7 月 21 日
Many thanks, for the printing and exporting link

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by