Home > wafo > wstats > range.m

range

PURPOSE ^

Calculates the difference between the maximum and minimum values.

SYNOPSIS ^

y = range(x)

DESCRIPTION ^

 RANGE  Calculates the difference between the maximum and minimum values. 
  
  CALL: r = range(x) 
 
    r =  max(x) - min(x), i.e. a scalar or vector giving the range of x
    x = vector or matrix
 
  Example:
    x=wexprnd(5,1,10)
    [min(x) max(x) range(x)]
 
  See also  max, min, iqr

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

01 function y = range(x)
02 %RANGE  Calculates the difference between the maximum and minimum values. 
03 % 
04 % CALL: r = range(x) 
05 %
06 %   r =  max(x) - min(x), i.e. a scalar or vector giving the range of x
07 %   x = vector or matrix
08 %
09 % Example:
10 %   x=wexprnd(5,1,10)
11 %   [min(x) max(x) range(x)]
12 %
13 % See also  max, min, iqr
14 
15 % By pab 06.02.2000
16 
17 y = max(x) - min(x);
18

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003