Half polar coordinates figure plot function halfPolar

版本 1.3.0.0 (2.8 KB) 作者: LIU Huideng
polar coordinates with angular range [0 pi]; specified line style and tick value.
2.1K 次下载
更新时间 2010/4/15

查看许可证

HALFPOLAR function performs the polar plot in radian angle range [0 pi]
using half polar coordinates

HALFPOLAR(phi,gain) makes a plot with phi in radians angle range [0 pi]
and gain in half polar coordinates. Phi and gain could be vector or matrix
with the same dimensions. When Phi is a vector(1XN) and vector(1XN) and
matrix(MXN)gain values are allowable. When Phi is a matrix(MXN) and then
the gain should only be matrix(MXN) with the same row numbers.

HALFPOLAR(phi,gain, linestyle) uses specified linestyle defined in cell
variable linestyle to plot phi and gain, like: linestyle = {'ko-','b--'}

HALFPOLAR(phi,gain, linestyle, xtickval) plots phi and gain with the
prescribed tick value xtickval. like: xtickval = [15 25 45 75 105]

IMPORTANT NOTE:
HALFPOLAR is designed especially for the radiated sould pressure level
demonstration. Accordingly the gain value is designed to be dB value.
the default xtickvalue is also designed to match the dB value range.
So you are permitted to modify the function in order to correctly
demonstrate data for your specified applications.

HALFPOLAR is coded straightforward without variables checking and fault
testing.The author don't take the responsibility for the program bug.

Example:
phi = linspace(0,pi,20);
gain = 80 * rand(3,length(phi)) + 40;
h = halfPolar(phi,gain,{'k-','g-.','r--','k-'},[30 40 65 80 95 120])

Another Example:
phi = linspace(0,pi,20);
gain = 80 * rand(3,length(phi)) + 40;
h = halfPolar(phi,gain,{'k-','g-.','r--','k-'},[30 40 65 80 95 120])

% Add legend to the half polar figure
legend(h,'1','2','3');

% set the specified line style and color
set(h(1),'linestyle','-.','color','b')

See also polar;

引用格式

LIU Huideng (2024). Half polar coordinates figure plot function halfPolar (https://www.mathworks.com/matlabcentral/fileexchange/27230-half-polar-coordinates-figure-plot-function-halfpolar), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2006a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Polar Plots 的更多信息
致谢

启发作品: pcolor in polar coordinates

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.3.0.0

The figure handle is obtained in order to set the specified line style, line marker and other properties. Also the legend function can be used to add the legend. The function is now more comprehensive!

1.0.0.0