Simultaneously get output and plot using RF Propagation Toolbox functions
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alex B
am 25 Okt. 2024
Kommentiert: Alex B
am 29 Okt. 2024 um 19:35
A number of functions in the Antenna and RF Propagation Toolboxes (such as los and link) have a behavior where, when called with no output, they will draw onto an active siteviewer. However, when called with an output, they will no longer draw to the site viewer. An example code is below:
% define the antennas to use
tx1 = txsite("Latitude", 38.9859, "Longitude", -76.9426);
rx1 = rxsite("Latitude", 38.98225, "Longitude", -76.941375);
siteviewer()
status = link(tx1,rx1) % the site viewer should not update to show the link
siteviewer()
link(tx1,rx1) % this should cause the 2nd site viewer to zoom in & draw the link
This snippet should create two siteviewers: one zoomed in with the link shown and another without the link. Is there any way to have a single funciton call return both the status and draw the link?
As a different-but-related quesiton, siteviewers are not closed by calling
close all
whats the best way to have a script close all open siteviewers at the start of execution? My script needs to open a new one for each simulation and I don't want all the old siteviewers just sitting around.
This question is marked as 2024b since that's the version I'm running, but it is a consistent problem on every version I've used these functions in.
1 Kommentar
Akzeptierte Antwort
Piyush Kumar
am 26 Okt. 2024
As per the documentation for the link function, there are 2 different ways of calling the same function to display the plot and return the success status, one with capturing the return value and one without capturing the return value in a variable. Unfortunately, I could not find a single function that can achieve both.
However, to close all the open siteviewers, you can use -
close all force
Weitere Antworten (1)
Walter Roberson
am 26 Okt. 2024
link() has internal code the is different when called with no outputs compared to one output. The code for no outputs calls a few internal routines for validating coordinates, and later creates plots and shows the rx and tx positions on the plot, and does other plotting work as well.
There is no option for graph output at the same time as calling with an output.
Siehe auch
Kategorien
Mehr zu RF Propagation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!