w_azimuth {starsExtra}R Documentation

Create matrix with azimuths to center

Description

Creates a matrix with directions (i.e., azimuth) to central cell, of specified size k. The matrix can be used as weight matrix when calculating the convergence index (see Examples).

Usage

w_azimuth(k)

Arguments

k

Neighborhood size around focal cell. Must be an odd number. For example, k=3 implies a 3*3 neighborhood.

Value

A matrix where each cell value is the azimuth from that cell towards the matrix center.

Examples

m = w_azimuth(3)
m
m = w_azimuth(5)
m


[Package starsExtra version 0.2.8 Index]