finding time domain of an excel FFT data
2 ビュー (過去 30 日間)
古いコメントを表示
Amirhossein Fathi
2023 年 6 月 16 日
編集済み: Shaik mohammed ghouse basha
2023 年 6 月 16 日
I have an Excel file of a signal FFT including frequency, amplitude and phase.
How can I find the Time domain (Time series) of this signal?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1412519/image.png)
0 件のコメント
採用された回答
Shaik mohammed ghouse basha
2023 年 6 月 16 日
編集済み: Shaik mohammed ghouse basha
2023 年 6 月 16 日
I understand that you have an exceel sheet which has Amplitude and Phase of set of frequency components and from this frequency data you want to get the time series data of the signal.
I took first 10 samples and tried at my end. This code works fine:
T = readtable('FrequencyData.xlsx'); %read the excel file as a table of data
numSamples = size(T,1); %returns number of rows i.e. number of differency frequencies
frequencyCoefficients = [numSamples]; %Convert polar form of each frequency component into complex number notation
for i=1:numSamples %iterate over each frequency sample
amp = table2array(T(i,2)); %access amplitude and angle of a particular frequency
ang = table2array(T(i,3)); %T(i,j) of a table returns data type table so type cast it into array for using it as a number
frequencyCoefficients(i) = amp*cos(ang) + 1i*amp*sin(ang); %A costheta + j A sintheta notation
end
%Now you have all frequency Coefficients, so apply inverse fast fourier
%transform function on this data to get time series plot.
timeSeries = ifft(frequencyCoefficients, numSamples)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Waveform Generation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!