gaussnoisetest_sim.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:3k
- //
- // File = gaussnoisetest_sim.cpp
- //
- #define SIM_NAME "GaussNoiseTest "
- #define SIM_TITLE "Gaussian Noise Testbed "
- #include "global_stuff.h"
- #include "gauss_theory.h"
- #include "level_gen.h"
- #include "histogram.h"
- #include "ogive.h"
- #include "siganchr.h"
- #include "add_gaus_noise.h"
- main()
- {
- #include "sim_preamble.cpp"
- //=========================================================================
- // Misc special processing
- GaussPdf( 0.0,//mean
- 0.5,//standard deviation
- 401,// num pts
- 50, // pts per s.d.
- "gauss_pdf.txt ");
- GaussCdf( 0.0,//mean
- 0.5002249,//standard deviation
- 400,// num pts
- 50, // pts per s.d.
- "gauss_cdf.txt ");
- //=========================================================================
- // Allocate signals
- FLOAT_SIGNAL(flat_line_sig);
- FLOAT_SIGNAL(noisy_sig);
- FLOAT_SIGNAL(power_meas_sig);
- //============================================================
- // Construct, initialize and connect models
-
- LevelGener* lev_gen = new LevelGener( "lev_gen ",
- CommSystem,
- flat_line_sig );
- SignalAnchor* flat_line_anchr = new SignalAnchor( "flat_line_anchr ",
- CommSystem,
- flat_line_sig );
- AdditiveGaussianNoise<float>* awgn_source = new AdditiveGaussianNoise<float>(
- "awgn_source ",
- CommSystem,
- flat_line_sig,
- noisy_sig,
- power_meas_sig);
- // DiscreteAutoCovar* disc_autocovar = new DiscreteAutoCovar( "disc_autocovar ",
- // CommSystem,
- // bit_seq);
- HistogramBuilder<float>* histogram = new HistogramBuilder<float>( "histogram ",
- CommSystem,
- noisy_sig);
- OgiveBuilder<float>* ogive = new OgiveBuilder<float>( "ogive ",
- CommSystem,
- noisy_sig);
- //=============================================================
- #include "sim_postamble.cpp"
- return 0;
- }