![Capture1.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218829/Capture1.png)
how to save siteviewer image from coverage function
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jonathon Cheah
am 18 Apr. 2019
Beantwortet: John K.
am 19 Jan. 2021
Antenna toolbox coverage function plots propagation terrain image. How to set image size and save image in script,? If manually adjusted the size of the image, how to save the image?
5 Kommentare
cheat morokot
am 14 Mai 2019
Bearbeitet: cheat morokot
am 14 Mai 2019
This is image that I get from coverage of siteviewer. Follow my comment above, you will get what you want. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219482/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219482/image.png)
cheat morokot
am 14 Mai 2019
Bearbeitet: cheat morokot
am 14 Mai 2019
You can view this video to get image from coverage function. (https://www.youtube.com/watch?v=P9Lstv0NFEI)
Akzeptierte Antwort
Abhi Sundararaman
am 14 Mai 2019
Based on your responses, it looks like you want to save a snapshot of the Site Viewer window, similar to saving a figure window's contents. Unfortunately, Site Viewer doesn't currently have any functionality similar to "savefig" or "saveas" for figures. For now you'd have to use utilities like "print screen" to save an snapshot of the Site Viewer.
You also mentioned wanting to change the size and orientation of the Site Viewer via script. Unfortunately, the orientation currently cannot be set using a script. You can still set the size of the viewer by changing the last two values of the "Position" field of the viewer like so.
viewer = siteviewer;
width = 600; % screen pixels
height = 400; % screen pixels
viewer.Position(3:4) = [width height]
Weitere Antworten (1)
John K.
am 19 Jan. 2021
Another way to capture screenshots of siteviewer directly from within Matlab is to use the screenshot diagnotic class.
png files are stored to a temporary directory and a prefix can be defined.
Create a TestCase for interactive use.
import matlab.unittest.TestCase
testCase = TestCase.forInteractiveUse;
Use a ScreenshotDiagnostic to log an image of the desktop as a test diagnostic with a custom prefix
import matlab.unittest.diagnostics.ScreenshotDiagnostic
testCase.log(ScreenshotDiagnostic('Prefix','LoggedScreenshot_'))
0 Kommentare
Siehe auch
Kategorien
Mehr zu RF Propagation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!