{"id":9162,"date":"2023-12-27T10:13:59","date_gmt":"2023-12-27T10:13:59","guid":{"rendered":"https:\/\/assignment.essayshark.com\/blog\/?p=9162"},"modified":"2024-04-23T07:48:01","modified_gmt":"2024-04-23T07:48:01","slug":"generating-white-gaussian-noise-using-randn-function-in-matlab","status":"publish","type":"post","link":"https:\/\/assignmentshark.com\/blog\/generating-white-gaussian-noise-using-randn-function-in-matlab\/","title":{"rendered":"Generating White Gaussian Noise Using Randn Function in Matlab"},"content":{"rendered":"<blockquote><p><em>Matlab is a great tool for conducting scientific and engineering calculations. This software has a great number of toolboxes that gives a wide variety of possible operations. In the following article we are going to talk about generating white Gaussian noise using Randn function and plot it. If you are just learning how to use Matlab, our guide should help. Besides you can check other samples available on our blog and find more essential information for your engineering classes.<\/em><\/p>\n<p><em>Mathematics, programming, engineering \u2013 it\u2019s not a complete list of disciplines that our expert can cover. If you will find out that your discipline is missing in the order form, simply mention it and we will find the expert that will be ready to complete your task. We strive to make the ordering process easy and fast, so it will take no more than five minutes to complete the order form. For your convenience, our service is available seven days a week. Value your time and choose AssignmentShark.com <a href=\"https:\/\/assignmentshark.com\/\" target=\"_blank\" rel=\"noopener\">online assignment help<\/a>.<\/em><!--more--><\/p><\/blockquote>\n<h2 style=\"text-align: center;\">Gaussian White Noise Signal<\/h2>\n<p><strong>Task:<\/strong> Use Matlab to generate a Gaussian white noise signal of length L=100,000 using the randn function and plot it.<\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>Since the random variables in the white noise process are statistically uncorrelated, the covariance function contains values only along the diagonal. The matrix above indicates that only the autocorrelation function exists for each random variable. The cross-correlation values are zero (samples\/variables are statistically uncorrelated with respect to each other). The diagonal elements are equal to the variance and all other elements in the matrix are zero.<\/p>\n<p>Plot the histogram of the generated white noise and verify the histogram by plotting against the theoretical pdf of the Gaussian random variable. This can be achieved in a few ways.<\/p>\n<p>Way 1<\/p>\n<p>Code:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9166 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1-1024x390.jpg\" alt=\"gaussian noise matlab\" width=\"604\" height=\"230\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1-1024x390.jpg 1024w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1-300x114.jpg 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1-768x292.jpg 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/1-1.jpg 1259w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9172 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2-902x1024.png\" alt=\"white gaussian noise\" width=\"604\" height=\"686\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2-902x1024.png 902w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2-264x300.png 264w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2-768x872.png 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/2-2.png 1259w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a>Way 2<\/p>\n<p>Code:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9176 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3-1024x249.jpg\" alt=\"white gaussian noise matlab\" width=\"604\" height=\"147\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3-1024x249.jpg 1024w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3-300x73.jpg 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3-768x187.jpg 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/3-3.jpg 1259w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9178 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4-1024x180.png\" alt=\"white gaussian noise matlab assignment\" width=\"604\" height=\"106\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4-1024x180.png 1024w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4-300x53.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4-768x135.png 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/4.png 1259w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9180 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4-1024x821.png\" alt=\"white gaussian noise matlab sample\" width=\"604\" height=\"484\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4-1024x821.png 1024w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4-300x241.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4-768x616.png 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/6-4.png 1289w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>The computed autocorrelation function has to be scaled properly. If the \u2018xcorr\u2019 function (inbuilt in Matlab) is used for computing the autocorrelation function, use the \u2018biased\u2019 argument in the function to scale it properly.<\/p>\n<p>Compute PSD of the above generated multi-dimensional process and average it to get a smooth plot.<\/p>\n<p>Code:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9184 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3-1024x118.jpg\" alt=\"how to generate gaussian noise in matlab\" width=\"604\" height=\"70\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3-1024x118.jpg 1024w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3-300x35.jpg 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3-768x88.jpg 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/7-3.jpg 1269w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9186 size-large\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn-819x1024.png\" alt=\"white gaussian noise matlab randn\" width=\"604\" height=\"755\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn-819x1024.png 819w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn-240x300.png 240w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn-768x960.png 768w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2018\/08\/white-gaussian-noise-matlab-randn.png 1282w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>The PSD plot of a white noise gives almost fixed power in all the frequencies. In other words, for a white noise signal, the PSD is constant (flat) across all the frequencies (-\u221e to + \u221e).<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Matlab is a great tool for conducting scientific and engineering calculations. This software has a great number of toolboxes that gives a wide variety of possible operations. In the following article we are going to talk about generating white Gaussian noise using Randn function and plot it. If you are just learning how to use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,35],"tags":[],"class_list":["post-9162","post","type-post","status-publish","format-standard","hentry","category-math","category-samples"],"_links":{"self":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/9162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/comments?post=9162"}],"version-history":[{"count":8,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/9162\/revisions"}],"predecessor-version":[{"id":12825,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/9162\/revisions\/12825"}],"wp:attachment":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/media?parent=9162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/categories?post=9162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/tags?post=9162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}