✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
为了绘制风玫瑰图,通过实例详细介绍了利用Matlab实现对风向,风速数据的自动提取,自动处理,自动绘图和自动输出,与其他方法相比,该方法通用性强,易于移植,输出图形美观,可实现对任意台站,任意时段风玫瑰图的绘制和输出
⛄ 部分代码
clc; clear; close all;
Options = {'anglenorth',0,... 'The angle in the north is 0 deg (this is the reference from our data, but can be any other)
'angleeast',90,... 'The angle in the east is 90 deg
'labels',{'N (0°)','NE (45°)','E (90°)','SE (135°)','S (180°)','SW (225°)','W (270°)','NW (315°)'},... 'If you change the reference angles, do not forget to change the labels.
'freqlabelangle','auto',...
'legendtype',0,...
'min_radius',0.25,...
'titlestring',''};
ax(1) = subplot(1,3,1);
[speed,direction] = WindRandomDistrib(8760,20);
[figure_handle,count,speeds,directions,Table] = WindRose(direction,speed,[Options,{'axes',ax(1)}]);
subplot(1,3,2);
[speed,direction] = WindRandomDistrib(8760,30);
[figure_handle,count,speeds,directions,Table] = WindRose(direction,speed,[Options,{'axes',gca}]);
[speed,direction] = WindRandomDistrib(8760,30);
[figure_handle,count,speeds,directions,Table] = WindRose(direction,speed,[Options,{'axes',subplot(1,3,3)}]);
⛄ 运行结果
⛄ 参考文献
[1]张立波. 基于Matlab的风玫瑰图绘制[J]. 电脑编程技巧与维护, 2012(18):3.