Matlab App - Display an antenna plot in the main figure of an app
2 views (last 30 days)
Show older comments
Hi folks,
I am developping an app with app designer, that consists for now of only one main figure. This figure features numeric edit fields, a table, buttons, ...
I would like to integrate a balloon plot to it as well. This balloon plot is created with the patternCustom() function of the Antenna Toolbox and looks like the following:
I don't know how to plot that on the main figure. I had added an Axes object on the main figure at first, but it doesn't seem to do the job.
I want this plot to make one with the main figure and not be in a separate figure.
Any ideas anyone?
Many thanks in advance
Antoine
0 Comments
Answers (1)
Puru Kathuria
on 7 May 2021
% Create a helix antenna
% Generated by MATLAB(R) 9.10 and Antenna Toolbox 5.0.
% Generated on: 05-May-2021 18:45:49
%% Antenna Properties
antennaObject = helix;
% Show
figure;
show(antennaObject)
%% Antenna Analysis
% Define plot frequency
plotFrequency = 2100*1e6;
% Define frequency range
freqRange = (1890:21:2310)*1e6;
% impedance
figure;
impedance(antennaObject, freqRange)
% sparameter
figure;
s = sparameters(antennaObject, freqRange);
rfplot(s)
% pattern
figure;
pattern(antennaObject, plotFrequency)
% azimuth
figure;
patternAzimuth(antennaObject, plotFrequency, 0, 'Azimuth', 0:5:360)
You can use antenna toolbox app to generate a similar plot as shown in the example above and then you can export the script to a .m file. Furthermore, you can use the script to generate the plot and use this script in your codebase. You can add and modify the script according to your requirements.
0 Comments
See Also
Categories
Find more on Get Started with Antenna Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!