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);
  2 件のコメント
Jasmine
Jasmine 2022 年 8 月 31 日
I've already tried this and it unfortunately won't work

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeArray Catalog についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by