2014-02-13 19:23:39 +00:00
|
|
|
#include <iostream>
|
2014-03-13 18:51:01 +00:00
|
|
|
#include <LatAnalyze/AsciiFile.hpp>
|
|
|
|
#include <LatAnalyze/Plot.hpp>
|
2014-02-13 19:23:39 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Latan;
|
|
|
|
|
2014-02-17 18:50:26 +00:00
|
|
|
int main(int argc, char *argv[])
|
2014-02-13 19:23:39 +00:00
|
|
|
{
|
2014-02-17 18:50:26 +00:00
|
|
|
if (argc != 2)
|
|
|
|
{
|
|
|
|
cerr << "usage: " << argv[0] << " <file>" << endl;
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
2014-02-13 19:23:39 +00:00
|
|
|
|
2014-02-17 18:50:26 +00:00
|
|
|
string fileName = argv[1];
|
2014-02-13 19:23:39 +00:00
|
|
|
|
2014-02-17 18:50:26 +00:00
|
|
|
cout << "-- loading sample from '" << fileName << "'..." << endl;
|
2014-02-20 23:52:45 +00:00
|
|
|
const DMatSample &s = Io::load<DMatSample, AsciiFile>(fileName);
|
2014-02-17 18:50:26 +00:00
|
|
|
cout << scientific;
|
2014-02-13 19:23:39 +00:00
|
|
|
cout << "central value:\n" << s[central] << endl;
|
|
|
|
cout << "standard deviation:\n" << s.variance().cwiseSqrt() << endl;
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|