1 function plot_wind_3d(CX,W,level,scale,stride)
2 % plot_wind_3d(CX,W,level,scale)
4 % CX {x,y,z} 3D coordinates where the wind vectors are located
5 % W {u,v,w} 3D wind vectors
6 % level vector of number of vertical levels to display
7 % default if none or empty: all levels
8 % scale scaling of wind vector arrow, see doc quiver
9 % stride display wind vectors
12 [n(1),n(2),n(3)]=size(CX{1});
13 if ~exist('level','var') || isempty(level)
16 if ~exist('scale','var') || isempty(scale)
20 if ~exist('stride','var') || isempty(stride)
24 quiver3(CX{1}(1:stride:end,1:stride:end,level),...
25 CX{2}(1:stride:end,1:stride:end,level),...
26 CX{3}(1:stride:end,1:stride:end,level),...
27 W{1}(1:stride:end,1:stride:end,level),...
28 W{2}(1:stride:end,1:stride:end,level),...
29 W{3}(1:stride:end,1:stride:end,level),...
31 xlabel('x'), ylabel('y'), zlabel('z')