1. Using the MATLAB Graphical Environment
Select the figure window that shows the figure to be saved and then follow the steps mentioned below:
- Click on File>>Export Setup.
- A menu named as “Export Setup: Figure Name” must have popped up.
- On the left side of the menu, choose the option named “Rendering”. After that, change the value of:
- ‘Colorspace’ to ’grayscale’
- ‘Resolution(dpi)’ to 300
This step is shown in image file “Step3.jpeg” attached to the solution.
- Click on ‘Apply to Figure’ button.
- Click ‘OK’ button.
- The menu should have disappeared and you should see the figure window with all your changes applied.
- Click on File>>Save As.
- Now, you can save the file to your system. Please do not forget to save as “TIFF image”.
2. Saving a figure to an image file programmatically
a) Use "print" as:
>> print(gcf, '-dtiff', 'myfigure.tiff');
b) Alternatively, you could do:
>> imagewd = getframe(gcf); >> imwrite(imagewd.cdata, 'myfigure.tiff');
To change the quality of a TIFF file, you can specify 'Compression',''none' and increase the resolution with 'Resolution',300.
'Matlab ' 카테고리의 다른 글
check whether have another matlab function somewhere on your path (0) | 2017.02.22 |
---|---|
matlab svm papameter tuning (0) | 2017.02.18 |
Is there a way to connect to Microsoft SQL Server database without needing the database toolbox? (0) | 2017.02.08 |
Matlab: Running an m-file from command-line (0) | 2017.02.06 |
start MATLAB from a DOS window running inside Windows (0) | 2017.02.06 |