How to show a polar plot (Azimuth Pattern - Antenna) in MATLAB App Designer?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Roby Karan
el 3 de Nov. de 2022
Comentada: Kevin Holly
el 3 de Nov. de 2022
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?
0 comentarios
Respuesta aceptada
Kevin Holly
el 3 de Nov. de 2022
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 comentarios
Kevin Holly
el 3 de Nov. de 2022
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'
Más respuestas (0)
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!