If you have C++11 or higher you can use http://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution. I think that solves the first problem. Check out https://stackoverflow.com/questions/32889309/adding-gaussian-noise for an example of using it for Gaussian noise.
On Tue, Jun 5, 2018 at 1:19 PM Linda20071 <linda20...@gmail.com> wrote: > I understand the uniform random generator and Gaussian generator have > already been implemented in gnuradio. However, For some reason, I need to > implement some customized blocks to generate my own random sequences. > > Could an expert here explain: > 1. Is there a function in C++ that can generate a uniform noise? Is it the > function rand() in math.h? > 2. Is there a function in C++ that can generate a Gaussian noise? > > If yes, are there any documents on how to use these two functions? > > Thank you. > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio