I have I and Q data in time but I need to plot them in frequency

조회 수: 41 (최근 30일)
Steven Seppala
Steven Seppala 2017년 1월 26일
댓글: Walter Roberson 2017년 1월 27일
I have I & Q data in the time domain (all numbers are between +/- 1) And I can plot the time domain representation with.
figure ; plot(1:length(in_i),in_i) ; hold on ; plot(1:length(in_q), in_q); hold off;
which gives me the following :
However I need to look at the frequency domain of these values to see if it is displaying the correct frequencies that I belvie it should be. Is there a way to do this?
  댓글 수: 1
John BG
John BG 2017년 1월 27일
편집: John BG 2017년 1월 27일
where is the time reference?
is the time delay between adjacent samples known?
please spcify
John BG

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

답변 (1개)

John Chilleri
John Chilleri 2017년 1월 26일
Hello,
Your solution lies within your tags. The Fourier transform is a way to change a signal from its original domain to a representation in the frequency domain [ WIKI ].
MATLAB has an implementation of the fast Fourier transform named fft.
To change your data to the frequency domain, you can:
Q2 = fft(Q);
I2 = fft(I);
Hope this helps!
  댓글 수: 4
Steven Seppala
Steven Seppala 2017년 1월 26일
This is the file I am working with. It's a standard CSV with the in_q and in_i in the C & D col respectively.
Thank you !
Walter Roberson
Walter Roberson 2017년 1월 27일
data = dlmread('data_capture.txt', '\t', 2);
in_q = data(:,3);
in_i = data(:,4);
fin_q = fft(in_q);
fin_i = fft(in_i);
nnz(isnan(fin_q)) %gives 0 -- none of the values are nan
nnz(isnan(fin_i)) %gives 0 -- none of the values are nan
subplot(1,2,1); plot(abs(fin_q)); title('abs fft of in_q');
subplot(1,2,2); plot(abs(fin_i)); title('abs fft of in_i');

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

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by