필터 지우기
필터 지우기

csv data to fft in matlab

조회 수: 71 (최근 30일)
Kyong Sun Bae
Kyong Sun Bae 2021년 12월 5일
댓글: Kyong Sun Bae 2021년 12월 5일
this 1_20mhz.csv data is time domain signal
one of vector means time and the last one is Voltage of the signal
i want to change this csv data to fft in matlab
(time, voltage) -> (frequency , magnitude)

채택된 답변

Chunru
Chunru 2021년 12월 5일
편집: Chunru 2021년 12월 5일
x = readmatrix("1_20mhz.csv");
n = size(x, 1);
fs = 1/diff(x(1:2)) % sampling frequency
fs = 5.0000e+07
y = fft(x(:,2));
f = (0:n-1)/n*fs;
%plot(f, abs(y))
plot(f/1e6, 20*log10(abs(y)))
xlabel('f(MHz)'); ylabel('Amp (dB)'); grid on
xlim([1.9 20])
  댓글 수: 4
Kyong Sun Bae
Kyong Sun Bae 2021년 12월 5일
holy moly i love you so much!! thank you very much
Kyong Sun Bae
Kyong Sun Bae 2021년 12월 5일
but i want to before answer that you replied
can you bring me the code that you replied first at my question?

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by