How can I convert matlab plots/graphs to jpeg file?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Chuzymatics Chuzymatics
el 21 de Jul. de 2014
Comentada: Chuzymatics Chuzymatics
el 21 de Jul. de 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')
0 comentarios
Respuesta aceptada
Akshay
el 21 de Jul. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Printing and Saving en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!