plot white noise PSD in matlab?

Status
Not open for further replies.

fanshuo

Full Member level 5
Joined
Jun 21, 2007
Messages
266
Helped
8
Reputation
16
Reaction score
4
Trophy points
1,298
Location
Netherlands
Activity points
2,746
noise psd

how to do that without using "psd" command?
Thanks!
 

psd white noise

calculate the power spectral density using mathematical expressions and then plot the array.

Simple
 

power spectral density matlab

there is a scaling factor after the fft to make it a unitary transform
what is that?
 

psd noise

you can see fft of x as
y=fft(x,512);
df=fs/512;
m=fftshift(abs);
m=m.^2;
m1=20*log10(m);
p=unwrap(angle);
f = -(fs/2)+df:dffs/2);
%f=(0:length-1)*fs/length;
figure;
plot(f,m1);title('magnitude')
 

Re: psd noise

you can see fft of x as
y=fft(x,512);
df=fs/512;
m=fftshift(abs);
m=m.^2;
m1=20*log10(m);
p=unwrap(angle);
f = -(fs/2)+df:dffs/2);
%f=(0:length-1)*fs/length;
figure;
plot(f,m1);title('magnitude')

f = -(fs/2):dffs/2)-df; would be better
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…