fabien van mook

all packages "fvm-*"

package "fvm-geometry"

function file "azimuthname.m"

Function s = azimuthname(a)
         s = azimuthname(a,w)
         s = azimuthname(a,l)

returns the name of the _closest_ wind or compass
direction for the given azimuth a, measured in degrees
clockwise from north.

The optional second input argument is either cell-array w
or string l.

Input argument w is a row cell-array of strings. It lists
the names of the wind or compass sectors clockwise from
north, and in its last element it additionally contains
the string to be printed when the value of azimuth is NaN.

Input argument l is either string "en" or "nl", for
standard names of a wind rose of 16 sectors in English or
Dutch, respectively. If the value of azimuth is NaN, "-"
is returned.

At default, the output names are taken from a wind rose
of 16 sectors, in Dutch: n, nno, no, ..., nw, nnw.

If input argument a is a single numerical value, s will
be a character vector. If a is a matrix, s will be a
cell-array of character vectors, of the same size as a.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-geometry" under GNU GPLv3+