Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

sdtest.cpp

Go to the documentation of this file.
00001 
00002 #include <stdio.h>
00003 
00004 #include "stddev.h"
00005 
00012 double  data[] = {1472, 1315, 1984, 1900, 1646,
00013                   1709, 1780, 1571, 1681, 1453,
00014                   1799, 1372, 1420, 1612, 1546,
00015                   1255, 1818, 1357, 1412, 1775, 
00016                   1850, 1417, 2057, 1468, 1694,
00017                   1776, 1456, 1489, 1618, 1544,
00018                   1251, 1422, 1506, 1651, 1687, 
00019                   1080, 1866, 1713, 1624, 1370,
00020                   2107, 1668, 1411, 1654, 1503,
00021                   1934, 1451, 1240, 1500, 1606 };
00022 
00023 main()
00024 {
00025   size_t N = sizeof( data ) / sizeof(double);
00026   stddev sd;
00027   double mu, sigma;
00028   
00029   sigma = sd.sd( data, N );
00030   mu = sd.mean();
00031   printf("stddev = %7.4f, mean = %7.4f\n", sigma, mu );
00032 }

Generated at Wed May 21 21:19:27 2003 for Basic Statistics Functions by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001