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

5 vues (au cours des 30 derniers jours)
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics le 21 Juil 2014
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')

Réponse acceptée

Akshay
Akshay le 21 Juil 2014
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 commentaire
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics le 21 Juil 2014
Many thanks, for the printing and exporting link

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by