plot frequency/amplitude response of data from labview

2 ビュー (過去 30 日間)
shirin
shirin 2019 年 10 月 8 日
コメント済み: Star Strider 2019 年 10 月 9 日
hi
i have exported data from labview to plot them in matlab.i tried but it dose not give me same plot as labview can anyone help please i have attached my data.
Capture.PNG
  3 件のコメント
shirin
shirin 2019 年 10 月 8 日
thanks for your reply. the sampling frequency is 2.5GHz. and the data are 32768 samples.
regards
Star Strider
Star Strider 2019 年 10 月 9 日
I’ve worked with this on and off during the day, and I have no idea why the LabView and MATLAB spectra for that signal are so different. LabView must be doing something to it that it’s not telling you.
My code:
[D,S] = xlsread('shirin test.xlsx');
L = numel(D);
Fs = 2.5E9; % Sampling Frequency
t = linspace(0, L, L)*1/Fs; % Create Time Vector
Fn = Fs/2; % Nyquist Frequency
FTD = fft(D)/L; % Scaled Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
plot(Fv, 20*log10(abs(FTD(Iv))*2))
grid
xlim([0 2E+8])
If you can find out what LabView is doing or how it calculates the Fourier transform that makes it so different from the MATLAB result, please post back here.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeImport Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by