- Access the data from the Scope block: You can do this by setting the 'Data logging' parameter of the Scope block to 'on'. This will save the output to a workspace variable.
- Plot the data using MATLAB's plotting functions: Once you have the data in the MATLAB workspace, you can use `plot` function to create a figure.
- Save the figure in high resolution: You can use the 'print` function to save your figure. To save in high resolution, you can use the `-r` option in the `print` function to specify the resolution as shown below:
Scope print to figure. Problem with resolution
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
I'm trying to save the data plotted onto the scope of my simulink file and when I do so by clicking File tab > Print to Figure, the printed figure is low resolution like images shown below.
How can I fix this problem? How can I save the original resolution?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1071415/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1071420/image.png)
댓글 수: 0
답변 (1개)
Ayush Aniket
2023년 9월 28일
As per my understanding the issue you're experiencing is common when using the 'Print to Figure' feature in Simulink. For better resolution pictures, a workaround is to programmatically save the data from the scope and then plot it using MATLAB's plotting functions instead of using 'Print to Figure'.
These are the steps that you can follow:
%saves the figure in 300 DPI.
print('figure1','-dpng','-r300')
You can read about saving data from scope block by referring to the following link:
Also, for more details on the various arguments in the 'print, function you can refer to the following link:
Hope this helps.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!