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

조회 수: 3 (최근 30일)
Jasmine
Jasmine 2022년 8월 30일
댓글: Jasmine 2022년 8월 31일
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);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Array Catalog에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by