필터 지우기
필터 지우기

How to add a white Noise with rms amplitude of 0.5 v by matlab?

조회 수: 23 (최근 30일)
Chung Di
Chung Di 2017년 11월 20일
댓글: Star Strider 2017년 11월 20일
Write an m-file with MATLAB, define a signal with an amplitude of 0.7 V at 20 Hz and an amplitude of 1 V at 50 Hz. Now run a frequency analysis following settings respectively: a) Sampling rate: 1000 Hz, signal length: 1 s b) Same with a) but add white noise of rms-amplitude of 0.5 V
I am confused with (b). How can I solve it ?

채택된 답변

Star Strider
Star Strider 2017년 11월 20일
The randn function returns normally-distributed random numbers with a mean of 0 and a standard deviation of 1. The standard deviation is essentially the rms value. So multiply your randn vector by 0.5.
  댓글 수: 2
Chung Di
Chung Di 2017년 11월 20일
Could u please write the command, it will be helpful. Thank you
Star Strider
Star Strider 2017년 11월 20일
Your signal is sampled at 1000 Hz (sampling frequency) and is 1 second long. So you need to tell randn to return a vector of 1000 samples that is the same row and column size as your signal vector, then multiply that noise vector by 0.5 before adding it to your signal vector.
If ‘s’ is your signal vector, your noise vector would be
nv = 0.5*randn(size(s));
See the documentation on randn (link) for details.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by