How to perform Discrete-Time Fourier Transform (DTFT) on a TDMS file using MATLAB
3 ビュー (過去 30 日間)
古いコメントを表示
I have a tdms file , now I need to DTFT to frequency domain dddeecfile_path = "F:\\.Trashes\\501\\test tdms write\\C6.tdms";
fprintf('Load tdms data from:\n%s\n', file_path);
data = tdmsread(file_path);
data_1 = data{:, 1};
X = data_1{:, :};
N = length(X); % 數據長度
X_fft = fft(X, N) / N; % 正規化
frequencies = (0:N-1)*(1/N); % 頻率向量
figure;
plot(frequencies, abs(X_fft)) % 繪製FFT的幅度
xlabel('頻率 (Hz)')
ylabel('幅度')
title('信號的FFT')
2 件のコメント
Image Analyst
2024 年 4 月 2 日
If you have any more questions, then attach your data with the paperclip icon after you read this:
You may have to zip up the file to attach it. And it also must be less than 5 MB.
Why do you suspect something is wrong with your code?
Ayush Modi
2024 年 4 月 16 日
@Jiang refer the following discussion in the community -
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!