✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
????个人主页:Matlab科研工作室
????个人信条:格物致知。
更多Matlab仿真内容点击????
⛄ 内容介绍
基于Matlab绘制风向与风速的关系图
⛄ 部分代码
clc;
close all
% embed the data into vector format:
% wdir = [] ;
% metrespersec = [];
% OR
% LOAD the data from a texfile. Please make sure it is co-resident with
% the script and MATLAB-file.
s = load('winddata.txt','-ascii');
wdir = s(:,1); %angles are in degrees which is ideal for the MATLAB
%function 'PLOTWINDIRVEL' to work correctly
%but it can take the wind direction in radians too.
metrespersec = s(:,2); %coresponding to magnitude
[a,b] = plotWinDirVel(wdir,metrespersec,...
{'Wind Direction^\circ and Wind Speed (length of arrow)'} ); %...(zero degrees is true North)'});