필터 지우기
필터 지우기

FFT conversion

조회 수: 2 (최근 30일)
divijesh puninchathaya
divijesh puninchathaya 2011년 6월 26일
We want to take fft of time domain data of acceleration between 0 to 3 sec in 30000 samlpes.How to include time into fft like x= fft(t,a)where a= matrix of acceleration data of 30000x 1 size.Suppose if the same data is collected in 5 secs for 30 000 samples how it affects fft.wether fft depends only on 30000 accelearation data or also on the time duration in which this data is collected.How to get that.

답변 (1개)

Rick Rosson
Rick Rosson 2011년 6월 26일
The first thing you need to do is to compute the sampling rate Fs, which is simply the number of samples per second that you have in your time domain data. You can compute Fs very easily in MATLAB using the information you have provided:
N = size(a,1);
startTime = 0;
stopTime = 3;
Fs = N/(stopTime - startTime);
In this example, Fs should have a value of 10,000 samples per second.
Once you have the sampling rate Fs, you can then compute the frequency domain for the Fourier spectrum. From the Nyquist theorem, the frequency domain that corresponds to the Fourier transform will range from 0 hertz to Fs hertz in increments of Fs/N hertz:
x = fft(a);
dF = Fs/N;
f = 0:dF:Fs-dF;
figure;
plot(f,abs(x));
Notice that you actually have a two-sided spectrum. It is often convenient to flip the two-sides of the spectrum using the fftshift function, and view the frequency domain from -Fs/2 to +Fs/2 instead:
x = fftshift(fft(a));
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF;
figure;
plot(f,abs(x));
HTH.
Rick
  댓글 수: 2
osman yurdakul
osman yurdakul 2011년 6월 26일
so how can i something by fft like in this image?
link : http://imageshack.us/photo/my-images/841/ekil2.jpg/
please help me
Rick Rosson
Rick Rosson 2011년 6월 26일
If you want help, please submit a question instead of a comment.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by