The rose plot will do a histogram with respect to direction. The for loop and subsequent plot will do the velocity-direction histogram, all without toolboxes, since I believe this uses only core MATLAB functions:
[d,s,r] = xlsread('Kyle Milke WindData.xlsx');
Q1 = d(1:5,:); % Data Excerpt (Line May Be Deleted)
figure(1)
rose(d(:,6)*180/pi, [0.5:10:355])
title('Wind Direction (Degrees)')
for k1 = 1:36 % Velocity Histogram Loop
Q2 = [d(:,6)>=(k1-1)*10 & d(:,6)<(k1)*10];
velhist(k1,:) = [(k1)*10 sum(Q2) sum(d(Q2,3)) sum(d(Q2,3))/sum(Q2)];
end
xr = [repmat(velhist(:,4)', 10, 1); zeros(1,36)];
xr = [0 reshape(xr, 1, [])];
th = linspace(0, 359, length(xr));
figure(2)
polar(th*pi/180, xr)
title('Mean Wind Velocity')
The ‘velhist’ matrix contains the angle in the first column, the number of observations in that angle bin in the second, the sum of the average wind velocities in the third, and the computed average of them in the fourth.
I believe this takes the data for both days, so if you want data for each, you will need to segregate them by day. (This is easiest using datenum and datevec in that order.)
You may have to experiment with it to get the result you want.
