- 积分
- 1288
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-4-17
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请问怎么将极坐标的刻度设置为与风频相对应的百分比?还有怎么填颜色,透明显示底图?
程序如下:b=[48,23,11,14,26,30,79,25]/328;%按照北、东北、东、东南、南、西南、西、西北顺时针顺序
a=72/328;%静风频率
n=length(b);
po=b;
m=5;%圈数
w=ceil(max(po)/m)/100;
dir_ang=(0:360/n:360)*pi/180;
wn=1/m;po=po/w/100*wn;po(n+1)=po(1);
po=po*wn/max(po)*m;
px=(po).*sin(dir_ang);
py=(po).*cos(dir_ang);
ang_cyc=0:0.01:2*pi;
for i=1:n+1
plot([-1 -0.08]*cos(dir_ang(i)),[-1 -0.08]*sin(dir_ang(i)),'k');
hold on
plot([0.08 1]*cos(dir_ang(i)),[0.08 1]*sin(dir_ang(i)),'k');
hold on
end
for i=1:m
plot((i*wn)*cos(ang_cyc),(i*wn)*sin(ang_cyc),'k:');% text((i-0.4)*wn,0.04,[num2str(i*w*100),'%']);
text((i)*wn,0.04,num2str(i*w*100));
hold on
end
plot(0.08* cos(ang_cyc),0.08*sin(ang_cyc) ,'k');
hold on
grid on
plot(px,py,'-','LineWidth',2);
plot(px,py,'.','LineWidth',4);
fill(px,py,'b');
text((m*wn+0.1)*sin(2/180*pi),(m*wn+0.1)*cos(2/180*pi),'N','rotation',180);
text((m*wn+0.1)*sin(42/180*pi),(m*wn+0.1)*cos(42/180*pi),'NE','rotation',-45);
text((m*wn+0.1)*sin(88/180*pi),(m*wn-0.8)*cos(88/180*pi),'E','rotation',0);
text((m*wn)*sin(132/180*pi),(m*wn+0.25)*cos(132/180*pi),'SE','rotation',45);
text((m*wn+0.1)*sin(178/180*pi),(m*wn+0.1)*cos(178/180*pi),'S','rotation',180);
text((m*wn+0.3)*sin(220/180*pi),(m*wn)*cos(220/180*pi),'SW','rotation',-45);
text((m*wn+0.15)*sin(268/180*pi),(m*wn-0.8)*cos(268/180*pi),'W','rotation',0);
text((m*wn+0.1)*sin(312/180*pi),(m*wn+0.1)*cos(312/180*pi),'NW','rotation',45);
axis off
axis equal
|
-
风频图
|