chvti
Newbie level 4
I have a set of random data that samples the noise voltage at 20us. Right now I am plotting PSD in dB. How do I plot it with respect with dBV? The following is my code:
Fs=50000;
datasize=size(RANDOM);
numsample=datasize(1);
numsample=numsample;
FFTX=fft(RANDOM,2),numsample);
X=FFTX(1:floor(numsample/2)).*conj(FFTX(1:floor(numsample/2)));
BW=1.5*Fs*numsample;
X=X/BW;
Omega=(0:numsample-1)/(numsample)*Fs;
Omega=Omega(1:floor(numsample/2));
H=plot(Omega,10*log10(X));
set(H,'Color','BLACK');
The file name is called RANDOM. Thanks for your help!!
Michael
Added after 3 hours:
I realized that what I posted sounds confusing. Let me rephrase it "I have a set of random data that was generated by sampling the noise. Right now I am plotting the PSD of the noise in dB. How do I plot it with respect to dBV?" The reason for doing this is because the magnitude I got in the plot using MATLAB is in dB. But on the dynamic signal analyzer, it shows the similar plot but the magnitude is in dBV. I want to make sure what I got from MATLAB is correct by checking with the signal analyzer.
Fs=50000;
datasize=size(RANDOM);
numsample=datasize(1);
numsample=numsample;
FFTX=fft(RANDOM,2),numsample);
X=FFTX(1:floor(numsample/2)).*conj(FFTX(1:floor(numsample/2)));
BW=1.5*Fs*numsample;
X=X/BW;
Omega=(0:numsample-1)/(numsample)*Fs;
Omega=Omega(1:floor(numsample/2));
H=plot(Omega,10*log10(X));
set(H,'Color','BLACK');
The file name is called RANDOM. Thanks for your help!!
Michael
Added after 3 hours:
I realized that what I posted sounds confusing. Let me rephrase it "I have a set of random data that was generated by sampling the noise. Right now I am plotting the PSD of the noise in dB. How do I plot it with respect to dBV?" The reason for doing this is because the magnitude I got in the plot using MATLAB is in dB. But on the dynamic signal analyzer, it shows the similar plot but the magnitude is in dBV. I want to make sure what I got from MATLAB is correct by checking with the signal analyzer.