generate white gaussian noise

197 ビュー (過去 30 日間)
Hong Lin
Hong Lin 2022 年 6 月 28 日
コメント済み: Hong Lin 2022 年 6 月 30 日
I want to generate a white gaussian noise vector by following the example given in Mathwork website:
y1=wgn(1000,1,0);
However, I always obtained the following message:
'wgn' requires Communications Toolbox.
When I clicked Comminications Toolbox, it shows the page with the above example. What is the problem?
Thanks for any helps.
  2 件のコメント
KSSV
KSSV 2022 年 6 月 29 日
Try:
which wgn
/MATLAB/toolbox/comm/comm/wgn.m
It seems, you don't have the communications toolbox.
Hong Lin
Hong Lin 2022 年 6 月 30 日
Is Communications toolbox an optional part of Matlab?

サインインしてコメントする。

採用された回答

David Goodmanson
David Goodmanson 2022 年 6 月 29 日
編集済み: David Goodmanson 2022 年 6 月 29 日
Hi HL,
Since white gaussian noise is just random draws from a normal distribution, you don't really need some toolbox or other, you can make your own (different example from yours):
P = 1e-3; % power in watts assuming x is the voltage across a 1 ohm resistor
x = sqrt(P)*randn(1,10000);
format short g
rms(x-mean(x))^2
ans = 0.0010206 % close to 1e-3
  1 件のコメント
Hong Lin
Hong Lin 2022 年 6 月 29 日
Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by