필터 지우기
필터 지우기

white gaussian noise and bandwidths

조회 수: 19 (최근 30일)
Paula Penullar
Paula Penullar 2020년 10월 6일
답변: Star Strider 2020년 10월 6일
I'm supposed to make a white noise with a variance of 1 and a mean of 2 and another with a variance of 4 and a mean of 2. Then, plot the signal in time and frequency domain. Generate a random signal n1(t) from n(t) that has bandwidth 1Hz by passing n(t) through a low pass filter. Plot n1(t) in time and frequency domain. Repeat for a random signal n4(t) that has bandwidth 4Hz.
I have an error in the line where v=...
what is wrong and does anyone have any advice as to completeing this assignment
%signals
fs = 1e2;%sampling frequency
t = -5:1/fs:5;%time vector
n = randn(1,length(t));%random: mean 0, var 1
mu = 2;
sig = 4;
v = exp*fn(n,mu,sig);%random: mean 2, var 4
p = [ zeros(1,floor(length(t)/3)) ones(1,ceil(length(t)/3)+1) zeros(1,floor(length(t)/3)) ];
c = cos(1.5*pi.*t);
g = exp((-pi.*t.^2)/2);

답변 (1개)

Star Strider
Star Strider 2020년 10월 6일
The problem is simply with your understanding of the randn funciton. It generates normally-distributed random values with a variance of 1 and a mean of 0. If you want to change those, multiiply or add the desired scalar quantities. So for example:
r = a*randn(1,100)+b;
generates uniformly distributed random numbers with a mean of ‘b’ and a standard deviation of ‘a’.
I’m certain you can take it from there!

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by