12 ofstream cleants, noisets, noisets2;
14 double noiselevel, currentvalue;
17 cout <<
"Outfile Name Base:";
19 cout <<
"Time Series Length:";
21 cout <<
"Noiselevel:";
23 cleants.open((outfilebase +
".ts").c_str());
24 noisets.open((outfilebase +
".ns").c_str());
25 noisets2.open((outfilebase +
".ns2").c_str());
26 ofstream onlynoise(
"noise.ts");
28 const double Period = 50;
29 const double PI = acos(-1.);
30 double noisevalue = 0;
31 for (
int i = 0; i < length; ++i)
37 noisevalue = (Random.
GetNumber() - 0.5) * noiselevel;
38 cleants << sin(2 * PI * i / Period) << endl;
39 noisets << cos(2 * PI * i / Period) + noisevalue << endl;
40 noisets2 << cos(2 * PI * i / Period) + noisevalue << endl;
41 onlynoise << noisevalue << endl;