MATLAB: Saving figures with minimum 300dpi in online matlab

dpifigureMATLAB and Simulink Student Suiteonlinesaving

I am using Matlab online 2020a, is there any way to specify the dpi of a figure when using the online version?
Cheers,
Tom

Best Answer

Use exportgraphics() to save the figure
exportgraphics(gcf, 'test.jpg', 'Resolution', 300)
saves currently active figure window.