Matlab App - Display an antenna plot in the main figure of an app

2 次查看(过去 30 天)
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

回答(1 个)

Puru Kathuria
Puru Kathuria 2021-5-7
% 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.

类别

Help CenterFile Exchange 中查找有关 Get Started with Antenna Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by