wfunctest.cpp

Go to the documentation of this file.
00001 #include <fstream>
00002 #include <WFunc.h>
00003 #include <vector>
00004 
00005 using namespace std;
00006 int main()
00007   {
00008     const unsigned int size = 500;
00009     vector<double> input(size, 1.0);
00010     for (unsigned int i = 0; i < size; ++i)
00011       input.at(i) = sin(i/10.0);
00012     ofstream tsfile("tsraw");
00013     for (unsigned int i = 0; i < size; ++i)
00014       tsfile << i << " " << input.at(i) << endl;
00015 
00016     ApplyWindow(input.begin(), input.end(), input.begin(), TruncCosSq(0.5),0.2);
00017     ofstream windowfile("tswin");
00018     for (unsigned int i = 0; i < size; ++i)
00019       windowfile << i << " " << input.at(i) << endl;
00020   }

Generated on Mon Sep 15 12:54:34 2008 for GPLIB++ by  doxygen 1.5.5