NAME

Math::VecStat - Some basic numeric stats on vectors

SYNOPSIS

use Math::VecStat qw(max min maxabs minabs sum average);
$max=max(@vector);
$max=max(\@vector);
($max,$imax)=max(@vector);
($max,$imax)=max(\@vector);
$min=min(@vector);
$min=min(\@vector);
($max,$imin)=min(@vector);
($max,$imin)=min(\@vector);
$max=maxabs(@vector);
$max=maxabs(\@vector);
($max,$imax)=maxabs(@vector);
($max,$imax)=maxabs(\@vector);
$min=minabs(@vector);
$min=minabs(\@vector);
($max,$imin)=minabs(@vector);
($max,$imin)=minabs(\@vector);
$sum=sum($v1,$v2,...);
$sum=sum(@vector);
$sum=sum(\@vector);
$average=average($v1,$v2,...);
$av=average(@vector);
$av=average(\@vector);

DESCRIPTION

This package procides some basic statistics on numerical
vectors. All the subroutines can take a copy of the vector, or,
preferably for efficiency, a reference to the vector to be operated
on.
max(@vector), max(\@vector)

return the maximum value of given values or vector. In an array context returns the value and the index in the array where it occurs.

min(@vector), min(\@vector)

return the minimum value of given values or vector, In an array context returns the value and the index in the array where it occurs.

maxabs(@vector), maxabs(\@vector)

return the maximum value of absolute of the given values or vector. In an array context returns the value and the index in the array where it occurs.

minabs(@vector), minabs(\@vector)

return the minimum value of the absolute of the given values or vector, In an array context returns the value and the index in the array where it occurs.

sum($v1,$v2,...), sum(@vector), sum(\@vector)

return the sum of the given values or vector

average($v1,$v2,..), average(@vector), average(\@vector)

return the average of the given values or vector

HISTORY

$Log: VecStat.pm,v $
Revision 1.5  1997/02/26 17:20:37  willijar
Added line before pod header so pod2man installs man page correctly

Revision 1.4  1996/02/20 07:53:10  willijar
Added ability to return index in array contex to max and min
functions. Added minabs and maxabs functions.
Thanks to Mark Borges <mdb@cdc.noaa.gov> for these suggestions.

Revision 1.3  1996/01/06 11:03:30  willijar
Fixed stupid bug that crept into looping in min and max functions

Revision 1.2  1995/12/26 09:56:38  willijar
Oops - removed xy data functions.

Revision 1.1  1995/12/26 09:39:07  willijar
Initial revision

BUGS

Let me know. I welcome any appropriate additions for this package.

AUTHOR

John A.R. Williams <J.A.R.Williams@aston.ac.uk>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 75:

You forgot a '=back' before '=head1'