File Exchange

image thumbnail

Wind barb plotter

version 1.3 (2.91 KB) by

Plots wind barbs (in knots) using Matlab's mapping toolbox.



View License

%WINDBARBM Project wind barbs onto map axes
% WINDBARBM(lat,lon,u,v) projects two dimensional wind barbs onto the
% current map axes. The vector components (u,v) are in units of knots and
% are specified at the points (lat,lon). It handles winds up to 130 knots.
% Winds exceeding 130 knots will appear as 130 knots.
% WINDBARBM(lat,lon,u,v,s) uses the input s to scale the vectors after
% they have been automatically scaled to fit within the grid. If omitted,
% s = 0.9 is assumed.
% WINDBARBM(lat,lon,u,v,'PropertyName',PropertyValue,...) and
% WINDBARBM(lat,lon,u,v,s,'PropertyName',PropertyValue,...) uses the
% windbarbm object properties specified to display the windbarb objects.
% The properties supported by windbarbm are the same as the properties
% supported by linem.
% MFILE: windbarbm.m
% MATLAB: 7.8.0 (R2009a)
% VERSION: 1.3 (28 November 2011)
% AUTHOR: Nick Siler

Comments and Ratings (4)


I have U and V..but vertically, how can I use windbarbm

I tried windbarb(ht,1,U,Y)

got error :

Error using windbarbm (line 41)
Inconsistent dimensions for inputs.

can anyone help

htt is matrix with height.
1 is any arbitrary point

Nathan West

For me I got the same error as Nicholas on line 161. To fix the undefined function "linem" error, replace




and it works perfectly!


I keep getting this error even though my array is double and 2d:

Error using LINEM
Expected input number 1, LAT, to be one of these types:


Instead its type was single.

Error in linem (line 57)
validateattributes(lat, {'double'}, {'2d'}, 'LINEM', 'LAT', 1)

Error in windbarbm (line 161)

Yang xm



Now accommodates user specification of wind barb properties (e.g., 'Color', 'LineWidth', etc.)


Now handles winds up to 130 knots.

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video