How to generate white noise with certain power spectral density using wgn function?

29 ビュー (過去 30 日間)
Wei Zhang
Wei Zhang 2021 年 12 月 11 日
編集済み: Ashutosh Singh Baghel 2021 年 12 月 20 日
wgn function has three arguments: wgn(m,n,power)
If I want to generate a white noise time series with power spectral density S0, whould I set "power" equal to S0?
Many thanks

回答 (1 件)

Ashutosh Singh Baghel
Ashutosh Singh Baghel 2021 年 12 月 20 日
編集済み: Ashutosh Singh Baghel 2021 年 12 月 20 日
Hi Wei,
I understand you wish to generate white noise samples in volts. This can be done using 'wgn' function.
m = 1000; % Number of white Gaussian noise samples
n = 1; % Number of channels desired
power = -6; % Power of noise samples
wgnoise = wgn(m,n,power);
var(wgnoise)
ans = 0.2573
Power of noise samples, is specified as a scalar. The default unit for power is dBW.
Please refer to MATLAB Documentation link of 'wgn(m,n,power)' function.

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by