How to use the 'polarpattern' function in App Designer?

3 views (last 30 days)
I have an antenna graph that I want displayed in polar form and I have made it a UIFIgure in code view. I need the polar plot to be apart of the GUI and not a 'figure' pop up like below. Currently, this code will compile and show the accurate graph. However, when I try to convert it into a UI Figure, I can create the polar plot but I cannot use the 'polar pattern' command which I need to display the right line.
tl.dr. I need the two graphs to look the same.
P = readtable('polarplot.csv');
x = table2array(P(:,"a"));
y = table2array(P(:,"b"));
hold on;
polarpattern(x,y);
P = polarpattern;
hold off;
I have tried using the polarpattern command in the updateplot(app) function however, it will not compile. The UIFigure appears but the polar plot is incorrect.
function updateplot(app)
%load data
Q = readtable('polarplot.csv');
x = table2array(Q(:,"a")); % phi
y = table2array(Q(:,"b")); % rho
plotline = polarplot(app.Pax,x,y); %this is what works currently
function PolarButtonPushed(app, event)
app.Pax = polaraxes(app.UIFigure);
app.Pax.Units = 'pixels';
app.Pax.Position = [370 110 90 200]
updateplot(app);

Answers (0)

Categories

Find more on Array Catalog 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!