white gaussian noise and bandwidths
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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);
0 comentarios
Respuestas (1)
Star Strider
el 6 de Oct. de 2020
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!
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!