Home > freetb4matlab > NaN > harmmean.m

harmmean

PURPOSE ^

HARMMEAN calculates the harmonic mean of data elements.

SYNOPSIS ^

function [y] = harmmean(x,DIM,W)

DESCRIPTION ^

 HARMMEAN calculates the harmonic mean of data elements. 
 The harmonic mean is the inverse of the mean of the inverse elements.
 
     y = harmmean(x [,DIM [,W]]) is the same as 
     y = mean(x,'H' [,DIM [,W]]) 

 DIM    dimension
    1 STD of columns
    2 STD of rows
    default or []: first DIMENSION, with more than 1 element
 W    weights to compute weighted mean (default: [])
    if W=[], all weights are 1. 
    number of elements in W must match size(x,DIM) 

 features:
 - can deal with NaN's (missing values)
 - weighting of data 
 - dimension argument also in Octave
 - compatible to Matlab and Octave

 see also: SUMSKIPNAN, MEAN, GEOMEAN

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003