Home > hfrc > matlab > @HFRC > density.m

# density

## PURPOSE

DENSITY - Calculates the spatial density of grid points around a

## SYNOPSIS

function dens = density( h, r, xy )

## DESCRIPTION

``` DENSITY - Calculates the spatial density of grid points around a
certain set of points for each timestep.

Usage: dens = density( hfrc_obj, radius, coord_pts )

radius is a distance in Km around each grid point to look for other data
points.  It can be a scalar, in which case a single distance is used, or
it can be a vector with as many elements as points in coord_pts.
coord_pts is a two column matrix of the coordinates of the points at which
the density is to be determined.  It should be in the same units as
totalGrid (i.e. either Km or lon,lat).  If this argument is absent, then
hfrc_obj.totalGrid is used.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\$Id: density.m,v 1.2 2006-06-20 00:51:27 dmk Exp \$

Copyright (C) 2001 David M. Kaplan
Licence: GPL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```

## CROSS-REFERENCE INFORMATION

This function calls:
• end END - basic end method for HFRC objects.
• gooddata GOODDATA - returns a matrix of good data in object.
• length LENGTH - returns number of times in HFRC object.
• lonlat2km LONLAT2KM - Converts dimensions of totalGrid to kms from lon,lat
• mean MEAN - mean of a field in an HFRC object
• size SIZE - returns [ (num times), (num gridpts) ].
• dist DIST - computes distance in between points in euclidean space.
This function is called by:

Generated on Mon 18-Dec-2006 07:26:46 by m2html © 2003