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

3 vues (au cours des 30 derniers jours)
Jasmine
Jasmine le 30 Août 2022
Commenté : Jasmine le 31 Août 2022
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);
  2 commentaires
Jasmine
Jasmine le 31 Août 2022
I've already tried this and it unfortunately won't work

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Array Catalog dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by