electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

how to use aditional mean value in FFT matlab????please help


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> how to use aditional mean value in FFT matlab????please help
Author Message
program2



Joined: 27 Sep 2009
Posts: 1
Location: sweden


Post27 Sep 2009 13:19   

how to use aditional mean value in FFT matlab????please help


Help please!!!!
i have sinwave with 0.1 v amplitude and 1khz frequency mixed with 5v white noise.
i used FFT in Matlab to simulate.

1-(Study the use of additional mean value calculation of every data set of FFT spectrum and how it affects the visibility of a present signal.). so, how can i use additional mean value???????????

2-Which window is the best for detecting weak signals in a noisy background?
i used some of windows but all are not useful!!!!!

Matlab code :

f1=1000; % Signal frequency
fs=5000; % Sampling frequency
N=128; % Number of samples
N1=2048; % Number of FFT points
p=128; % Define Number of samples noise
n=0:N-1; % Index n
f=(0:N1-1)*fs/N1; % Defining the frequency points [axis]
noise=rand(1,p); % Generate Uniformly Random Numbers
x=0.1*sin(2*pi*f1*n/fs)+5*noise; % Generate the signal
XR=abs(fft(x,N1)); % find the magnitude of the FFT using No
% windowing (i.e. Rectangular window)
xh=hamming(N); % Define the hamming samples
xw1=x .* xh'; % Window the signal
XH=abs(fft(xw1,N1)); % find the magnitude of the FFT of the
% windowed signal.
xha=hanning(N); % Define the hanning samples
xw2=x .* xha'; % Window the signal
XHA=abs(fft(xw2,N1)); % find the magnitude of the FFT of the
% windowed signal.
xbl=blackman(N); % Define the blackman samples
xw3=x .* xbl'; % Window the signal
XBL=abs(fft(xw3,N1)); % find the magnitude of the FFT of the
% windowed signal.
xba=bartlett(N); % Define the bartlett samples
xw4=x .* xba'; % Window the signal
XBA=abs(fft(xw4,N1)); % find the magnitude of the FFT of the
% windowed signal.
subplot(3,2,1); % Start plotting the signal
plot(f(1:N1/2),20*log10(XR(1:N1/2)/max(XR)));
title('Spectrum of x(t) using Rectangular Windows');
grid;
xlabel('Frequency, Hz');
ylabel('Normalised Magnitude, [dB]');
subplot(3,2,2);
plot(f(1:N1/2),20*log10(XH(1:N1/2)/max(XH)));
title('Spectrum of x(t) using Hamming Windows');
grid;
xlabel('Frequency, Hz');
ylabel('Normalised Magnitude, [dB]');
subplot(3,2,3);
plot(f(1:N1/2),20*log10(XHA(1:N1/2)/max(XHA)));
title('Spectrum of x(t) using Hanning Windows');
grid;
xlabel('Frequency, Hz');
ylabel('Normalised Magnitude, [dB]');
subplot(3,2,4); % Start plotting the signal
plot(f(1:N1/2),20*log10(XBL(1:N1/2)/max(XBL)));
title('Spectrum of x(t) using Blackman Windows');
grid;
xlabel('Frequency, Hz');
ylabel('Normalised Magnitude, [dB]');
subplot(3,2,5); % Start plotting the signal
plot(f(1:N1/2),20*log10(XBA(1:N1/2)/max(XBA)));
title('Spectrum of x(t) using Bartlett Windows');
grid;
xlabel('Frequency, Hz');
ylabel('Normalised Magnitude, [dB]');


any explain please!!!!
Back to top
Google
AdSense
Google Adsense




Post27 Sep 2009 13:19   

Ads




Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> how to use aditional mean value in FFT matlab????please help
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
FFT value with Matlab (3)
plotting FFT in matlab find error please (1)
How to use FFT analysis in cadence spectre??? (5)
how should I use the W/L value? (2)
Please help; what this Question mean (3)
how to write matlab code for fft (3)
How I use tektronix matlab waveform in MATLAB simulink? (2)
How to choose the points when using fft in Matlab? (4)
C++ How can i use default value when user just press enter? (5)
I'm interested in the mean value (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS