📄 cpol90.m
字号:
function q=cpol90(a,x,u)
% The function CPOL90 plots 2-D image in polar coordinates
% with 0 degrees located at the 12 o'clock position and
% degrees increasing counter-clockwise.
% To add labels to the contours do:
% hold on; eclabel(q,'fontsize',6); .
% Non MATLAB Library routine called is: POLARH
%
% Calling sequence-
% q=cpol90(r,x,u)
%
% Input-
% a - the radius
% x - the x-y axis column vector
% u - the matrix (issued from ro2xy.cpp)
% Output-
% q - the handle of the figure
%
% See also-
% POLARH, RO2XY.cpp.
close
r=a*ones(200,1);
d=linspace(0,2*pi,200)';
polarh(d,r);
%polar(d,r);
hold on
ss=max(max(u));
u=rot90(u)-2*ss; %rot90 make theta=0 at the top
%u=u-2*ss; %rot90 make theta=0 at the top
q=pcolor(x,x,flipud(u));
shading interp;
colormap(hsv);
hold off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -