フィルターのクリア

How to show a polar plot (Azimuth Pattern - Antenna) in MATLAB App Designer?

9 ビュー (過去 30 日間)
Roby Karan
Roby Karan 2022 年 11 月 3 日
コメント済み: Kevin Holly 2022 年 11 月 3 日
I am trying to show a polar plot using MATLAB App Designer. I want the plot to be displayed in the app, rather than opening it in a new figure.
The function I want to plot is:
pattern(array,fc,-180:180,0,'PropagationSpeed',c,'Type','powerdb',...
'CoordinateSystem','polar');
I am currently using the UIAxes function, but the problem is that the coordinate system is not polar and hence, I am not able to display the pattern correctly.
The code I am using now is:
pattern(app.ArrayURA,app.f, -180:180,0,'PropagationSpeed',app.c,'Type','powerdb',...
'CoordinateSystem','polar','Weights',app.w);
h = gca;
app.UIAxes_3.XLabel = h.XLabel;
app.UIAxes_3.YLabel = h.YLabel;
app.UIAxes_3.Title = h.Title;
for ii = length(h.Children):-1:1
h.Children(ii).Parent = app.UIAxes_3;
end
close(gcf)
How can I show the plot using the polar coordinate system?

採用された回答

Kevin Holly
Kevin Holly 2022 年 11 月 3 日
You can create a Panel and place the entire polaraxes in there with the following:
h = gca;
h.Parent = app.Panel;
close(gcf)
Please see app attached.
  2 件のコメント
Roby Karan
Roby Karan 2022 年 11 月 3 日
Thank you Kevin. I just want to ask you if there is a way of removing the background plot.
Kevin Holly
Kevin Holly 2022 年 11 月 3 日
How was the background axes created? What it in the panel before hand? If so, you can delete it in App Designer.
If you have an Axes there for another purpose and want to make it invisible, you can use it's handle to make it invisible. If it is an uiaxes, you can use:
app.UIAxes.Visible = 'off'

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by